diff --git a/.github/workflows/ci_general.yml b/.github/workflows/ci_general.yml index fec31fa..e3f9b50 100644 --- a/.github/workflows/ci_general.yml +++ b/.github/workflows/ci_general.yml @@ -1,8 +1,11 @@ name: General CI Checks on: + push: + branches: + - "**" pull_request: branches: - - main + - "**" permissions: contents: read diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index f8343fd..292da8b 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -2,34 +2,22 @@ openapi: 3.0.1 info: title: Apollo OpenAPI description: | - Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

- ## 认证方式 +

认证方式

+

所有 API 接口都需要通过 Authorization header 进行身份验证。

- 所有API接口都需要通过Authorization header进行身份验证。 +

获取 Token 的方式:

+
    +
  1. Portal 管理界面获取:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。
  2. +
  3. Token 格式Authorization: token_value
  4. +
  5. Token 权限:按应用/环境/命名空间授予,建议不同用途分别创建。
  6. +
- ### 获取Token的方式: +

使用示例

+
curl -X GET "http://localhost:8070/openapi/v1/apps" \
+    -H "Authorization: your_token_here"
- 1. **Portal管理界面获取**: - - 登录Apollo Portal管理界面 - - 进入"管理员工具" -> "开放平台授权管理" - - 创建第三方应用,获取Token - - 2. **Token格式**: - ``` - Authorization: token_value - ``` - - 3. **Token权限**: - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - - ### 使用示例: - ```bash - curl -X GET "http://localhost:8070/openapi/v1/apps" \ - -H "Authorization: your_token_here" - ``` version: 1.0.0 security: - ApiKeyAuth: [] @@ -79,7 +67,7 @@ paths: - orgId - orgName - ownerName - description: '' + description: 创建应用请求体,包含应用基本信息与管理员设置 required: true responses: '200': @@ -128,7 +116,7 @@ paths: get: summary: 获取当前Consumer授权的应用列表 deprecated: false - description: GET /openapi/v1/apps?authorized=true + description: GET /openapi/v1/apps/authorized tags: - App Management parameters: @@ -181,17 +169,17 @@ paths: type: string example: message: 'Unauthorized' - /openapi/v1/apps/{appId}/env-clusters: + /openapi/v1/apps/{appId}/envclusters: get: summary: 获取应用的环境集群信息 deprecated: false - description: GET /openapi/v1/apps/{appId}/env-clusters + description: GET /openapi/v1/apps/{appId}/envclusters tags: - App Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string @@ -238,7 +226,7 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string @@ -281,7 +269,7 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string @@ -298,11 +286,11 @@ paths: - orgId - orgName - ownerName - description: '' + description: 更新应用请求体 required: true responses: '200': - description: '' + description: 应用更新成功 content: application/json: schema: @@ -350,7 +338,7 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string @@ -448,7 +436,7 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string @@ -460,7 +448,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/EnvClusterInfo' + $ref: '#/components/schemas/OpenEnvClusterInfo' example: - env: 'DEV' clusters: @@ -486,7 +474,7 @@ paths: parameters: - name: env in: path - description: '' + description: 环境标识,例如 DEV、FAT、UAT、PROD required: true schema: type: string @@ -503,7 +491,7 @@ paths: - orgId - orgName - ownerName - description: '' + description: 在指定环境创建应用的请求体 required: true responses: '200': @@ -550,7 +538,7 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string @@ -578,43 +566,43 @@ paths: type: string example: message: 'App not found' - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: get: summary: 获取单个配置项 deprecated: false description: >- GET - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: key in: path - description: '' + description: 配置项键名 required: true schema: type: string @@ -651,7 +639,7 @@ paths: deprecated: false description: >- PUT - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} tags: - Item Management parameters: @@ -663,19 +651,19 @@ paths: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -756,97 +744,97 @@ paths: deprecated: false description: >- DELETE - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: key in: path - description: '' + description: 配置项键名 required: true schema: type: string - name: operator in: query - description: '' - required: true + description: 操作人用户名 + required: false schema: type: string responses: '200': - description: '' + description: 配置项删除成功 content: application/json: schema: type: object properties: {} headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items: get: summary: 获取命名空间下的配置项列表 deprecated: false - description: '' + description: 获取指定命名空间的配置项列表,支持分页 tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: page in: query - description: '' + description: 页码,从0开始 required: true example: 0 schema: type: integer - name: size in: query - description: '' + description: 每页数量 required: true example: 50 schema: @@ -904,31 +892,31 @@ paths: deprecated: false description: >- POST - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -943,7 +931,7 @@ paths: - key - dataChangeCreatedBy - value - description: '' + description: 创建配置项请求体 required: true responses: '200': @@ -984,43 +972,43 @@ paths: type: string example: message: 'Access is denied' - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: get: summary: 通过查询参数获取配置项(支持编码的key) deprecated: false description: >- GET - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: key in: path - description: '' + description: 配置项键名(需要URL编码) required: true schema: type: string @@ -1063,37 +1051,37 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: key in: path - description: '' + description: 配置项键名(需要URL编码) required: true schema: type: string - name: createIfNotExists in: query - description: '' + description: 若不存在则创建(true/false) required: true example: 'false' schema: @@ -1109,7 +1097,7 @@ paths: - key - dataChangeLastModifiedBy - value - description: '' + description: 更新配置项请求体(编码key) required: true responses: '200': @@ -1199,7 +1187,7 @@ paths: - name: operator in: query description: '' - required: true + required: false schema: type: string responses: @@ -1211,13 +1199,13 @@ paths: type: object properties: {} headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: put: summary: 通过文本批量修改配置项 deprecated: false description: >- PUT - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate tags: - Item Management parameters: @@ -1251,12 +1239,11 @@ paths: schema: type: object allOf: - - $ref: '#/components/schemas/NamespaceTextModel' + - $ref: '#/components/schemas/OpenNamespaceTextModel' required: - - operator - format - configText - description: '' + description: 批量更新配置文本请求体 required: true responses: '200': @@ -1270,17 +1257,6 @@ paths: type: string example: message: 'Batch update configuration items successfully' - '400': - description: '请求参数错误' - content: - application/json: - schema: - type: object - properties: - message: - type: string - example: - message: 'operator should not be null or empty' '403': description: '权限不足' content: @@ -1293,43 +1269,43 @@ paths: example: message: 'Access is denied' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: summary: 获取分支下的配置项 deprecated: false description: >- GET - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items tags: - Namespace Branch Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string @@ -1371,37 +1347,37 @@ paths: type: string example: message: 'Branch not found' - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare: + /openapi/v1/namespaces/items:compare: post: summary: 对比命名空间配置差异 deprecated: false description: >- POST - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare + /openapi/v1/namespaces/items:compare tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -1411,11 +1387,11 @@ paths: schema: type: object allOf: - - $ref: '#/components/schemas/NamespaceSyncModel' + - $ref: '#/components/schemas/OpenNamespaceSyncModel' required: - syncToNamespaces - syncItems - description: '' + description: 对比配置差异请求体 required: true responses: '200': @@ -1425,7 +1401,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/ListItemDiffs' + $ref: '#/components/schemas/OpenItemDiffs' example: - namespace: appId: '' @@ -1483,37 +1459,31 @@ paths: lineNum: 0 extInfo: '' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync: + /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync: post: summary: 同步配置项到多个命名空间 deprecated: false description: >- POST - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync tags: - Item Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' + description: 环境标识 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -1523,11 +1493,11 @@ paths: schema: type: object allOf: - - $ref: '#/components/schemas/NamespaceSyncModel' + - $ref: '#/components/schemas/OpenNamespaceSyncModel' required: - syncToNamespaces - syncItems - description: '' + description: 同步配置项请求体 required: true responses: '200': @@ -1564,13 +1534,14 @@ paths: example: message: 'Access is denied' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: + /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: post: summary: 验证配置文本语法 + operationId: validateItems deprecated: false description: >- POST - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate tags: - Item Management parameters: @@ -1604,7 +1575,7 @@ paths: schema: type: object allOf: - - $ref: '#/components/schemas/NamespaceTextModel' + - $ref: '#/components/schemas/OpenNamespaceTextModel' required: - format - configText @@ -1618,12 +1589,9 @@ paths: schema: type: object properties: - valid: - type: boolean message: type: string example: - valid: true message: 'Configuration syntax is valid' '400': description: '配置文本语法错误' @@ -1632,28 +1600,18 @@ paths: schema: type: object properties: - valid: - type: boolean message: type: string - errors: - type: array - items: - type: string example: - valid: false message: 'Configuration syntax validation failed' - errors: - - 'Line 3: Invalid property format' - - 'Line 7: Missing value for key "database.port"' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: post: summary: 撤销配置项更改 deprecated: false description: >- POST - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert tags: - Item Management parameters: @@ -1716,11 +1674,11 @@ paths: example: message: 'Access is denied' headers: {} - /openapi/v1/apps/{appId}/clusters/{clusterName}: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: get: summary: 获取指定集群信息 deprecated: false - description: GET /openapi/v1/apps/{appId}/clusters/{clusterName} + description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} tags: - Cluster Management parameters: @@ -1736,6 +1694,12 @@ paths: required: true schema: type: string + - name: env + in: path + description: '' + required: true + schema: + type: string responses: '200': description: '成功获取集群信息' @@ -1762,50 +1726,45 @@ paths: type: string example: message: 'Cluster not found' - /openapi/v1/apps/{appId}/clusters: - post: - summary: 创建集群 + delete: + summary: 删除集群 deprecated: false - description: POST /openapi/v1/apps/{appId}/clusters + description: DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} tags: - Cluster Management parameters: + - name: env + in: path + description: '' + required: true + schema: + type: string - name: appId in: path description: '' required: true schema: type: string - requestBody: - content: - application/json: - schema: - type: object - allOf: - - $ref: '#/components/schemas/OpenClusterDTO' - required: - - name - - appId - - dataChangeCreatedBy - description: '' - required: true + - name: clusterName + in: path + description: '' + required: true + schema: + type: string responses: '200': - description: '集群创建成功' + description: '集群删除成功' content: application/json: schema: - $ref: '#/components/schemas/OpenClusterDTO' + type: object + properties: + message: + type: string example: - dataChangeCreatedBy: 'apollo' - dataChangeLastModifiedBy: 'apollo' - dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' - dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' - name: 'test-cluster' - appId: 'sample-app' - headers: {} + message: 'Cluster deleted successfully' '400': - description: '请求参数错误' + description: '删除失败,集群可能包含配置' content: application/json: schema: @@ -1814,7 +1773,7 @@ paths: message: type: string example: - message: 'name and dataChangeCreatedBy should not be null or empty' + message: 'Cannot delete cluster with existing configurations' '403': description: '权限不足' content: @@ -1826,46 +1785,67 @@ paths: type: string example: message: 'Access is denied' - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: - summary: 删除集群 + '404': + description: '集群不存在' + content: + application/json: + schema: + type: object + properties: + message: + type: string + example: + message: 'Cluster not found' + headers: { } + /openapi/v1/envs/{env}/apps/{appId}/clusters: + post: + summary: 创建集群 deprecated: false - description: DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + description: POST /openapi/v1/envs/{env}/apps/{appId}/clusters tags: - Cluster Management parameters: - - name: env - in: path - description: '' - required: true - schema: - type: string - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - - name: clusterName + - name: env in: path - description: '' required: true schema: type: string + requestBody: + content: + application/json: + schema: + type: object + allOf: + - $ref: '#/components/schemas/OpenClusterDTO' + required: + - name + - appId + - dataChangeCreatedBy + description: 创建集群请求体 + required: true responses: '200': - description: '集群删除成功' + description: '集群创建成功' content: application/json: schema: - type: object - properties: - message: - type: string + $ref: '#/components/schemas/OpenClusterDTO' example: - message: 'Cluster deleted successfully' + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z' + name: 'test-cluster' + appId: 'sample-app' + headers: {} '400': - description: '删除失败,集群可能包含配置' + description: '请求参数错误' content: application/json: schema: @@ -1874,7 +1854,7 @@ paths: message: type: string example: - message: 'Cannot delete cluster with existing configurations' + message: 'name and dataChangeCreatedBy should not be null or empty' '403': description: '权限不足' content: @@ -1886,47 +1866,35 @@ paths: type: string example: message: 'Access is denied' - '404': - description: '集群不存在' - content: - application/json: - schema: - type: object - properties: - message: - type: string - example: - message: 'Cluster not found' - headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: post: summary: 创建发布 deprecated: false - description: '' + description: 创建并发布当前命名空间的配置 tags: - Release Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -1940,7 +1908,7 @@ paths: required: - releaseTitle - releasedBy - description: '' + description: 创建发布请求体 required: true responses: '200': @@ -1991,31 +1959,31 @@ paths: get: summary: 获取最新活跃发布 deprecated: false - description: '' + description: 查询命名空间最新活跃发布 tags: - Release Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -2058,43 +2026,43 @@ paths: post: summary: 合并分支 deprecated: false - description: '' + description: 合并灰度分支并可选择删除分支 tags: - Namespace Branch Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string - name: deleteBranch in: query - description: '' + description: 合并后是否删除分支(true/false) required: true example: 'true' schema: @@ -2109,7 +2077,7 @@ paths: required: - releaseTitle - releasedBy - description: '' + description: 合并分支并发布的请求体 required: true responses: '200': @@ -2161,37 +2129,37 @@ paths: post: summary: 创建灰度发布 deprecated: false - description: '' + description: 在分支上创建灰度发布 tags: - Namespace Branch Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string @@ -2205,11 +2173,11 @@ paths: required: - releaseTitle - releasedBy - description: '' + description: 创建灰度发布请求体 required: true responses: '200': - description: '' + description: 灰度发布创建成功 content: application/json: schema: @@ -2304,31 +2272,31 @@ paths: put: summary: 回滚发布 deprecated: false - description: '' + description: 回滚到指定的发布版本 tags: - Release Management parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: releaseId in: path - description: '' + description: 发布ID required: true schema: type: integer - name: operator in: query - description: '' - required: true + description: 操作人用户名 + required: false schema: type: string responses: '200': - description: '' + description: 发布回滚成功 content: application/json: schema: @@ -2345,19 +2313,19 @@ paths: parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: releaseId in: path - description: '' + description: 发布ID required: true schema: type: integer responses: '200': - description: '' + description: 成功获取发布详情 content: application/json: schema: @@ -2388,51 +2356,51 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: page in: query - description: '' + description: 页码,从0开始 required: true example: 0 schema: type: integer - name: size in: query - description: '' + description: 每页数量 required: true example: 5 schema: type: integer responses: '200': - description: '' + description: 成功获取发布列表 content: application/json: schema: type: array items: - $ref: '#/components/schemas/ListReleaseBO' + $ref: '#/components/schemas/OpenReleaseBO' example: - baseInfo: dataChangeCreatedBy: '' @@ -2466,45 +2434,45 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: page in: query - description: '' + description: 页码,从0开始 required: true example: 0 schema: type: integer - name: size in: query - description: '' + description: 每页数量 required: true example: 5 schema: type: integer responses: '200': - description: '' + description: 成功获取活跃发布列表 content: application/json: schema: @@ -2525,128 +2493,98 @@ paths: '': '' comment: '' headers: {} - /openapi/v1/envs/{env}/releases/compare: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: get: - summary: 对比发布 + summary: 获取命名空间下的实例数量 deprecated: false - description: GET /openapi/v1/envs/{env}/releases/compare + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances tags: - - Release Management + - Instance Management parameters: - name: env in: path - description: '' required: true schema: type: string - - name: baseReleaseId - in: query - description: '' - required: true - schema: - type: integer - - name: toCompareReleaseId - in: query - description: '' - required: true - schema: - type: integer - responses: - '200': - description: '' - content: - application/json: - schema: - type: object - properties: - changes: - type: array - items: - $ref: '#/components/schemas/Change' - example: - changes: - - type: '' - entity: - firstEntity: - key: '' - value: '' - secondEntity: - key: '' - value: '' - headers: {} - /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - summary: 获取命名空间下的实例数量 - deprecated: false - description: >- - GET - /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - tags: - - Instance Management - parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string responses: '200': - description: '' + description: 成功返回实例数量 content: application/json: schema: type: integer headers: {} - /openapi/v1/envs/{env}/releases/{releaseId}/instances: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search: get: summary: 根据发布版本查询实例(支持分页) deprecated: false - description: GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search tags: - Instance Management parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - - name: releaseId + - name: appId in: path - description: '' required: true schema: - type: integer + type: string + - name: clusterName + in: path + required: true + schema: + type: string + - name: namespaceName + in: path + required: true + schema: + type: string + - name: instanceAppId + in: query + required: false + schema: + type: string - name: page in: query - description: '' + description: 页码,从0开始 required: true example: 0 schema: type: integer - name: size in: query - description: '' + description: 每页数量 required: true example: 20 schema: type: integer responses: '200': - description: '' + description: 成功获取实例列表 content: application/json: schema: @@ -2679,37 +2617,37 @@ paths: dataChangeLastModifiedTime: '' dataChangeCreatedTime: '' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: get: summary: 查询不在指定发布版本中的实例 deprecated: false description: >- GET - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in?excludeReleases=1,2,3 tags: - Instance Management parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string @@ -2721,7 +2659,7 @@ paths: type: string responses: '200': - description: '' + description: 成功返回实例列表 content: application/json: schema: @@ -3081,19 +3019,19 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string responses: '200': - description: '' + description: 成功获取AppNamespace content: application/json: schema: @@ -3119,19 +3057,19 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string responses: '200': - description: '' + description: AppNamespace删除成功 content: application/json: schema: @@ -3148,13 +3086,13 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string responses: '200': - description: '' + description: 成功获取发布状态映射 content: application/json: schema: @@ -3177,33 +3115,33 @@ paths: parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: publicNamespaceName in: path - description: '' + description: 公共命名空间名称 required: true schema: type: string - name: page in: query - description: '' + description: 页码,从0开始 required: true example: 0 schema: type: integer - name: size in: query - description: '' + description: 每页数量 required: true example: 10 schema: type: integer responses: '200': - description: '' + description: 成功获取实例列表 content: application/json: schema: @@ -3243,31 +3181,31 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string responses: '200': - description: '' + description: 成功获取关联的公共Namespace content: application/json: schema: @@ -3305,25 +3243,25 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string responses: '200': - description: '' + description: 缺失的命名空间名称列表 content: application/json: schema: @@ -3345,31 +3283,31 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string responses: '200': - description: '' + description: 解除关联成功 content: application/json: schema: @@ -3424,31 +3362,31 @@ paths: parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string responses: '200': - description: '' + description: 成功获取分支信息 content: application/json: schema: @@ -3493,49 +3431,48 @@ paths: type: string example: message: 'Branch not found for this namespace' - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch: post: summary: 创建命名空间分支 deprecated: false description: >- POST - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches tags: - Namespace Branch Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: operator in: query - description: '' - required: true + description: 操作人用户名 + required: false schema: type: string responses: '200': - description: '' + description: 命名空间分支创建成功 content: application/json: schema: @@ -3573,43 +3510,43 @@ paths: parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string - name: operator in: query - description: '' - required: true + description: 操作人用户名 + required: false schema: type: string responses: '200': - description: '' + description: 分支删除成功 content: application/json: schema: @@ -3630,47 +3567,41 @@ paths: parameters: - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string - name: deleteBranch in: query - description: '' + description: 合并后是否删除分支(true/false) required: true example: 'true' schema: type: boolean - - name: X-Apollo-Operator - in: header - description: '' - required: true - schema: - type: string requestBody: content: application/json: @@ -3681,11 +3612,11 @@ paths: required: - releaseTitle - releasedBy - description: '' + description: 合并分支发布请求体 required: true responses: '200': - description: '' + description: 分支合并成功 content: application/json: schema: @@ -3704,49 +3635,49 @@ paths: '': '' comment: '' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: get: summary: 获取分支灰度发布规则 deprecated: false description: >- GET - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules tags: - Namespace Branch Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string responses: '200': - description: '' + description: 成功获取灰度发布规则 content: application/json: schema: @@ -3772,44 +3703,44 @@ paths: deprecated: false description: >- PUT - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules tags: - Namespace Branch Management parameters: - name: appId in: path - description: '' + description: 应用ID required: true schema: type: string - name: env in: path - description: '' + description: 环境标识 required: true schema: type: string - name: clusterName in: path - description: '' + description: 集群名称 required: true schema: type: string - name: namespaceName in: path - description: '' + description: 命名空间名称 required: true schema: type: string - name: branchName in: path - description: '' + description: 分支名称 required: true schema: type: string - name: operator - in: header - description: '' - required: true + in: query + description: 操作人用户名 + required: false schema: type: string requestBody: @@ -3821,11 +3752,11 @@ paths: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' required: - ruleItems - description: '' + description: 更新灰度发布规则请求体 required: true responses: '200': - description: '' + description: 灰度规则更新成功 content: application/json: schema: @@ -3900,7 +3831,6 @@ components: description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 app: $ref: '#/components/schemas/OpenAppDTO' - description: 应用基本信息,包含应用的详细配置数据 description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 OpenItemDTO: type: object @@ -3947,7 +3877,6 @@ components: type: array items: $ref: '#/components/schemas/OpenItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenItemDTO description: 当前页的配置项列表,包含具体的配置项数据 description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 OpenClusterDTO: @@ -3974,10 +3903,8 @@ components: description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 MapString: type: object - properties: - key: + additionalProperties: type: string - description: 字符串映射对象,用于表示键值对的配置数据结构 OpenReleaseDTO: type: object properties: @@ -4011,7 +3938,6 @@ components: description: 发布名称,用于标识这次发布的版本或描述 configurations: $ref: '#/components/schemas/MapString' - description: 本次发布包含的所有配置项键值对 comment: type: string description: 发布备注,描述本次发布的变更内容和目的 @@ -4136,7 +4062,6 @@ components: type: array items: $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenGrayReleaseRuleItemDTO description: 灰度发布规则项列表,包含具体的灰度规则条件 description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 OpenNamespaceDTO: @@ -4215,359 +4140,188 @@ components: properties: env: type: string - description: '' + description: 环境标识,例如 DEV、FAT、UAT、PROD clusters: type: array items: type: string - description: '' - ClusterDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - description: '' - dataChangeLastModifiedBy: - type: string - description: '' - dataChangeCreatedByDisplayName: - type: string - description: '' - dataChangeLastModifiedByDisplayName: - type: string - description: '' - dataChangeCreatedTime: - type: string - description: '' - dataChangeLastModifiedTime: - type: string - description: '' - id: - type: integer - description: '' - format: int64 - name: - type: string - description: '' - pattern: '[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*' - appId: - type: string - description: '' - parentClusterId: - type: integer - description: '' - format: int64 - comment: - type: string - description: '' - required: - - name - - appId - EnvClusterInfo: + description: 该环境下的集群名称列表 + OpenEnvClusterInfo: type: object properties: env: type: string - description: '' + description: 环境标识 clusters: type: array items: - $ref: '#/components/schemas/ClusterDTO' - description: com.ctrip.framework.apollo.common.dto.ClusterDTO - description: '' + $ref: '#/components/schemas/OpenClusterDTO' + description: 集群信息列表 - NamespaceTextModel: + OpenNamespaceTextModel: type: object properties: appId: type: string - description: '' + description: 应用唯一标识 env: type: string - description: '' + description: 环境标识 clusterName: type: string - description: '' + description: 集群名称 namespaceName: type: string - description: '' + description: 命名空间名称 namespaceId: type: integer - description: '' + description: 命名空间ID format: int64 format: type: string - description: '' + description: 命名空间格式类型(properties/xml/json/yml等) configText: type: string - description: '' + description: 配置内容的原始文本 operator: type: string - description: '' - NamespaceIdentifier: + description: 操作者用户名 + OpenNamespaceIdentifier: type: object properties: appId: type: string - description: '' + description: 应用唯一标识 env: type: string - description: '' + description: 环境标识 clusterName: type: string - description: '' + description: 集群名称 namespaceName: type: string - description: '' - ItemDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - description: '' - dataChangeLastModifiedBy: - type: string - description: '' - dataChangeCreatedByDisplayName: - type: string - description: '' - dataChangeLastModifiedByDisplayName: - type: string - description: '' - dataChangeCreatedTime: - type: string - description: '' - dataChangeLastModifiedTime: - type: string - description: '' - id: - type: integer - description: '' - format: int64 - namespaceId: - type: integer - description: '' - format: int64 - key: - type: string - description: '' - type: - type: integer - description: '' - value: - type: string - description: '' - comment: - type: string - description: '' - lineNum: - type: integer - description: '' - ItemChangeSets: + description: 命名空间名称 + OpenItemChangeSets: type: object properties: dataChangeCreatedBy: type: string - description: '' + description: 变更集合创建者用户名 dataChangeLastModifiedBy: type: string - description: '' + description: 变更集合最后修改者用户名 dataChangeCreatedByDisplayName: type: string - description: '' + description: 创建者显示名 dataChangeLastModifiedByDisplayName: type: string - description: '' + description: 最后修改者显示名 dataChangeCreatedTime: type: string - description: '' + description: 变更集合创建时间(ISO 8601) dataChangeLastModifiedTime: type: string - description: '' + description: 变更集合最后修改时间(ISO 8601) createItems: type: array items: - $ref: '#/components/schemas/ItemDTO' - description: com.ctrip.framework.apollo.common.dto.ItemDTO - description: '' + $ref: '#/components/schemas/OpenItemDTO' + description: 待创建的配置项列表 default: [] updateItems: type: array items: - $ref: '#/components/schemas/ItemDTO' - description: com.ctrip.framework.apollo.common.dto.ItemDTO - description: '' + $ref: '#/components/schemas/OpenItemDTO' + description: 待更新的配置项列表 default: [] deleteItems: type: array items: - $ref: '#/components/schemas/ItemDTO' - description: com.ctrip.framework.apollo.common.dto.ItemDTO - description: '' + $ref: '#/components/schemas/OpenItemDTO' + description: 待删除的配置项列表 default: [] - ListItemDiffs: + OpenItemDiffs: type: object properties: namespace: - $ref: '#/components/schemas/NamespaceIdentifier' - description: '' + $ref: '#/components/schemas/OpenNamespaceIdentifier' diffs: - $ref: '#/components/schemas/ItemChangeSets' - description: '' + $ref: '#/components/schemas/OpenItemChangeSets' extInfo: type: string - description: '' - NamespaceSyncModel: + description: '扩展信息' + OpenNamespaceSyncModel: type: object properties: syncToNamespaces: type: array items: - $ref: '#/components/schemas/NamespaceIdentifier' - description: com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier - description: '' + $ref: '#/components/schemas/OpenNamespaceIdentifier' + description: 目标命名空间标识列表 syncItems: type: array items: - $ref: '#/components/schemas/ItemDTO' - description: com.ctrip.framework.apollo.common.dto.ItemDTO - description: '' - + $ref: '#/components/schemas/OpenItemDTO' + description: 需要同步的配置项列表 - ReleaseDTO: - type: object - properties: - dataChangeCreatedBy: - type: string - description: '' - dataChangeLastModifiedBy: - type: string - description: '' - dataChangeCreatedByDisplayName: - type: string - description: '' - dataChangeLastModifiedByDisplayName: - type: string - description: '' - dataChangeCreatedTime: - type: string - description: '' - dataChangeLastModifiedTime: - type: string - description: '' - id: - type: integer - description: '' - format: int64 - releaseKey: - type: string - description: '' - name: - type: string - description: '' - appId: - type: string - description: '' - clusterName: - type: string - description: '' - namespaceName: - type: string - description: '' - configurations: - type: string - description: '' - comment: - type: string - description: '' - isAbandoned: - type: boolean - description: '' KVEntity: type: object properties: key: type: string - description: '' + description: 键 value: type: string - description: '' - ListReleaseBO: + description: 值 + OpenReleaseBO: type: object properties: baseInfo: - $ref: '#/components/schemas/ReleaseDTO' - description: '' + $ref: '#/components/schemas/OpenReleaseDTO' items: type: array items: $ref: '#/components/schemas/KVEntity' - description: com.ctrip.framework.apollo.portal.entity.bo.KVEntity - description: '' - EntityPairKVEntity: - type: object - properties: - firstEntity: - $ref: '#/components/schemas/KVEntity' - description: '' - secondEntity: - $ref: '#/components/schemas/KVEntity' - description: '' - Change: - type: object - properties: - type: - type: string - description: '' - enum: - - ADDED - - MODIFIED - - DELETED - entity: - $ref: '#/components/schemas/EntityPairKVEntity' - description: '' OpenInstanceConfigDTO: type: object properties: release: $ref: '#/components/schemas/OpenReleaseDTO' - description: '' releaseDeliveryTime: type: string - description: '' + description: 配置下发时间(ISO 8601) dataChangeLastModifiedTime: type: string - description: '' - OpenInstanceDTO: &ref_3 + description: 最后修改时间(ISO 8601) + OpenInstanceDTO: type: object properties: id: type: integer - description: '' + description: 实例ID format: int64 appId: type: string - description: '' + description: 实例所属应用ID clusterName: type: string - description: '' + description: 实例所属集群名称 dataCenter: type: string - description: '' + description: 数据中心/机房标识 ip: type: string - description: '' + description: 实例IP地址 configs: type: array items: $ref: '#/components/schemas/OpenInstanceConfigDTO' - description: com.ctrip.framework.apollo.openapi.dto.OpenInstanceConfigDTO - description: '' + description: 实例当前生效的配置列表 dataChangeCreatedTime: type: string - description: '' + description: 数据创建时间(ISO 8601) @@ -4576,10 +4330,10 @@ components: properties: orgId: type: string - description: '' + description: 组织ID orgName: type: string - description: '' + description: 组织名称 servers: [] diff --git a/clean.sh b/clean.sh index 0fb5548..1f46cc9 100755 --- a/clean.sh +++ b/clean.sh @@ -1,13 +1,15 @@ #!/bin/bash set -e - +SPRING_BOOT2_DIR="spring-boot2" JAVA_DIR="java" PYTHON_DIR="python" RUST_DIR="rust" TS_DIR="typescript" + echo "🧹 Cleaning old generated SDKs..." rm -rf "$JAVA_DIR" rm -rf "$PYTHON_DIR" rm -rf "$RUST_DIR" rm -rf "$TS_DIR" +rm -rf "$SPRING_BOOT2_DIR" diff --git a/generate.sh b/generate.sh index 0aa9363..1a7630f 100755 --- a/generate.sh +++ b/generate.sh @@ -2,40 +2,51 @@ set -e SPEC_FILE="apollo-openapi.yaml" -JAVA_CLIENT_DIR="java-client" SPRING_BOOT2_DIR="spring-boot2" +JAVA_DIR="java" PYTHON_DIR="python" RUST_DIR="rust" TS_DIR="typescript" echo "🧹 Cleaning old generated SDKs..." -rm -rf "$JAVA_CLIENT_DIR" +rm -rf "$JAVA_DIR" rm -rf "$SPRING_BOOT2_DIR" rm -rf "$PYTHON_DIR" rm -rf "$RUST_DIR" rm -rf "$TS_DIR" +# +#echo "🚀 Generating Python SDK..." +#openapi-generator generate +# -i "$SPEC_FILE" +# -g python +# -o "$PYTHON_DIR" +# --package-name apollo_openapi +# --additional-properties=projectName=apollo-openapi,packageVersion=0.0.1 +# +#echo "🚀 Generating TypeScript SDK..." +#openapi-generator generate +# -i "$SPEC_FILE" +# -g typescript-fetch +# -o "$TS_DIR" +# --additional-properties=npmName=apollo-openapi,npmVersion=0.0.1,typescriptThreePlus=true +# +#echo "🚀 Generating Rust SDK..." +#openapi-generator generate +# -i "$SPEC_FILE" +# -g rus +# -o "$RUST_DIR" +# --global-property models,supportingFiles +# --additional-properties=packageName=apollo-openapi,packageVersion=0.0.1 +# +#echo "🚀 Generating Java SDK..." +#openapi-generator generate +# -i "$SPEC_FILE" +# -g java +# -o "$JAVA_DIR" +# --additional-properties=groupId=com.apollo,artifactId=apollo-openapi-client,artifactVersion=0.0.1,packageName=com.apollo.openapi.client +# +#echo "✅ SDK generation complete." -echo "🚀 Generating Python SDK..." -openapi-generator generate \ - -i "$SPEC_FILE" \ - -g python \ - -o "$PYTHON_DIR" \ - --package-name apollo_openapi \ - --additional-properties=projectName=apollo-openapi,packageVersion=0.0.1 - -echo "🚀 Generating TypeScript SDK..." -openapi-generator generate \ - -i "$SPEC_FILE" \ - -g typescript-fetch \ - -o "$TS_DIR" \ - --additional-properties=npmName=apollo-openapi,npmVersion=0.0.1,typescriptThreePlus=true - -echo "🚀 Generating Java Client SDK..." -openapi-generator generate \ - -i "$SPEC_FILE" \ - -g java \ - -o "$JAVA_CLIENT_DIR" \ - --additional-properties=groupId=com.apollo,artifactId=apollo-openapi-client,artifactVersion=0.0.1,packageName=com.apollo.openapi.client echo "🚀 Generating Spring Boot 2 Server..." openapi-generator generate \ @@ -47,8 +58,14 @@ openapi-generator generate \ echo "📦 Adding Maven Wrapper to Spring Boot 2 project..." cd "$SPRING_BOOT2_DIR" mvn -N io.takari:maven:wrapper -Dmaven=3.8.6 -cd .. +echo "Cleaning files (trailing spaces, CRLF, EOF newlines)..." +find . -type d \( -name .git -o -name .idea -o -name .mvn -o -name target -o -name build -o -name node_modules \) -prune -o \ + -type f \( -name "*.java" -o -name "*.xml" -o -name "*.properties" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.sh" -o -name ".editorconfig" -o -name ".gitignore" -o -name "mvnw" -o -name "mvnw.cmd" \) -print0 \ +| xargs -0 perl -i -0777 -pe 's/[ \t]+(?=\r?$)//mg; s/\r//g; s/\s*\z/\n/s' +echo "Done." + +cd .. echo "💡 Spring Boot 2 project ready! To start the server, run:" echo " cd $SPRING_BOOT2_DIR && ./mvnw spring-boot:run" @@ -59,13 +76,3 @@ if [ "$1" = "--start-spring-boot" ]; then echo "✅ Spring Boot server started in background. Access it at http://localhost:8080" cd .. fi - -echo "🚀 Generating Rust SDK..." -openapi-generator generate \ - -i "$SPEC_FILE" \ - -g rust \ - -o "$RUST_DIR" \ - --global-property models,supportingFiles \ - --additional-properties=packageName=apollo-openapi,packageVersion=0.0.1 - -echo "✅ SDK generation complete." diff --git a/java-client/.github/workflows/maven.yml b/java-client/.github/workflows/maven.yml deleted file mode 100644 index 1ddae88..0000000 --- a/java-client/.github/workflows/maven.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -# -# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) - -name: Java CI with Maven - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build: - name: Build Apollo OpenAPI - runs-on: ubuntu-latest - strategy: - matrix: - java: [ 17, 21 ] - steps: - - uses: actions/checkout@v4 - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/java-client/.gitignore b/java-client/.gitignore deleted file mode 100644 index a530464..0000000 --- a/java-client/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/java-client/.openapi-generator-ignore b/java-client/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/java-client/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/java-client/.openapi-generator/FILES b/java-client/.openapi-generator/FILES deleted file mode 100644 index 5f140ce..0000000 --- a/java-client/.openapi-generator/FILES +++ /dev/null @@ -1,173 +0,0 @@ -.github/workflows/maven.yml -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -docs/AppManagementApi.md -docs/Change.md -docs/ClusterDTO.md -docs/ClusterManagementApi.md -docs/EntityPairKVEntity.md -docs/EnvClusterInfo.md -docs/InstanceManagementApi.md -docs/ItemChangeSets.md -docs/ItemDTO.md -docs/ItemManagementApi.md -docs/KVEntity.md -docs/ListItemDiffs.md -docs/ListReleaseBO.md -docs/MapString.md -docs/NamespaceBranchManagementApi.md -docs/NamespaceGrayDelReleaseDTO.md -docs/NamespaceIdentifier.md -docs/NamespaceManagementApi.md -docs/NamespaceReleaseDTO.md -docs/NamespaceSyncModel.md -docs/NamespaceTextModel.md -docs/OpenAppDTO.md -docs/OpenAppNamespaceDTO.md -docs/OpenClusterDTO.md -docs/OpenCreateAppDTO.md -docs/OpenEnvClusterDTO.md -docs/OpenGrayReleaseRuleDTO.md -docs/OpenGrayReleaseRuleItemDTO.md -docs/OpenInstanceConfigDTO.md -docs/OpenInstanceDTO.md -docs/OpenItemDTO.md -docs/OpenNamespaceDTO.md -docs/OpenNamespaceLockDTO.md -docs/OpenOrganizationDto.md -docs/OpenPageDTOOpenInstanceDTO.md -docs/OpenPageDTOOpenItemDTO.md -docs/OpenReleaseDTO.md -docs/OpenapiV1AppsGet401Response.md -docs/OpenapiV1AppsPost400Response.md -docs/OpenapiV1AppsPostRequest.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md -docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md -docs/OrganizationManagementApi.md -docs/ReleaseDTO.md -docs/ReleaseManagementApi.md -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/org/openapitools/client/ApiCallback.java -src/main/java/org/openapitools/client/ApiClient.java -src/main/java/org/openapitools/client/ApiException.java -src/main/java/org/openapitools/client/ApiResponse.java -src/main/java/org/openapitools/client/Configuration.java -src/main/java/org/openapitools/client/GzipRequestInterceptor.java -src/main/java/org/openapitools/client/JSON.java -src/main/java/org/openapitools/client/Pair.java -src/main/java/org/openapitools/client/ProgressRequestBody.java -src/main/java/org/openapitools/client/ProgressResponseBody.java -src/main/java/org/openapitools/client/ServerConfiguration.java -src/main/java/org/openapitools/client/ServerVariable.java -src/main/java/org/openapitools/client/StringUtil.java -src/main/java/org/openapitools/client/api/AppManagementApi.java -src/main/java/org/openapitools/client/api/ClusterManagementApi.java -src/main/java/org/openapitools/client/api/InstanceManagementApi.java -src/main/java/org/openapitools/client/api/ItemManagementApi.java -src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java -src/main/java/org/openapitools/client/api/NamespaceManagementApi.java -src/main/java/org/openapitools/client/api/OrganizationManagementApi.java -src/main/java/org/openapitools/client/api/ReleaseManagementApi.java -src/main/java/org/openapitools/client/auth/ApiKeyAuth.java -src/main/java/org/openapitools/client/auth/Authentication.java -src/main/java/org/openapitools/client/auth/HttpBasicAuth.java -src/main/java/org/openapitools/client/auth/HttpBearerAuth.java -src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java -src/main/java/org/openapitools/client/model/Change.java -src/main/java/org/openapitools/client/model/ClusterDTO.java -src/main/java/org/openapitools/client/model/EntityPairKVEntity.java -src/main/java/org/openapitools/client/model/EnvClusterInfo.java -src/main/java/org/openapitools/client/model/ItemChangeSets.java -src/main/java/org/openapitools/client/model/ItemDTO.java -src/main/java/org/openapitools/client/model/KVEntity.java -src/main/java/org/openapitools/client/model/ListItemDiffs.java -src/main/java/org/openapitools/client/model/ListReleaseBO.java -src/main/java/org/openapitools/client/model/MapString.java -src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java -src/main/java/org/openapitools/client/model/NamespaceIdentifier.java -src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java -src/main/java/org/openapitools/client/model/NamespaceSyncModel.java -src/main/java/org/openapitools/client/model/NamespaceTextModel.java -src/main/java/org/openapitools/client/model/OpenAppDTO.java -src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java -src/main/java/org/openapitools/client/model/OpenClusterDTO.java -src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java -src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java -src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java -src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java -src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java -src/main/java/org/openapitools/client/model/OpenInstanceDTO.java -src/main/java/org/openapitools/client/model/OpenItemDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java -src/main/java/org/openapitools/client/model/OpenOrganizationDto.java -src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java -src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java -src/main/java/org/openapitools/client/model/OpenReleaseDTO.java -src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java -src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java -src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java -src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java -src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java -src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java -src/main/java/org/openapitools/client/model/ReleaseDTO.java -src/test/java/org/openapitools/client/api/AppManagementApiTest.java -src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java -src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java -src/test/java/org/openapitools/client/api/ItemManagementApiTest.java -src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java -src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java -src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java -src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java -src/test/java/org/openapitools/client/model/ChangeTest.java -src/test/java/org/openapitools/client/model/ClusterDTOTest.java -src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java -src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java -src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java -src/test/java/org/openapitools/client/model/ItemDTOTest.java -src/test/java/org/openapitools/client/model/KVEntityTest.java -src/test/java/org/openapitools/client/model/ListItemDiffsTest.java -src/test/java/org/openapitools/client/model/ListReleaseBOTest.java -src/test/java/org/openapitools/client/model/MapStringTest.java -src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java -src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java -src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java -src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java -src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java -src/test/java/org/openapitools/client/model/OpenAppDTOTest.java -src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java -src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java -src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java -src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java -src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java -src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java -src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java -src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java -src/test/java/org/openapitools/client/model/OpenItemDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java -src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java -src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java -src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java -src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java -src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java -src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java -src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java -src/test/java/org/openapitools/client/model/ReleaseDTOTest.java diff --git a/java-client/.openapi-generator/VERSION b/java-client/.openapi-generator/VERSION deleted file mode 100644 index 368fd8f..0000000 --- a/java-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.15.0 diff --git a/java-client/.travis.yml b/java-client/.travis.yml deleted file mode 100644 index 1b6741c..0000000 --- a/java-client/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Generated by OpenAPI Generator: https://openapi-generator.tech -# -# Ref: https://docs.travis-ci.com/user/languages/java/ -# -language: java -jdk: - - openjdk12 - - openjdk11 - - openjdk10 - - openjdk9 - - openjdk8 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - #- mvn test - # test using gradle - - gradle test - # test using sbt - # - sbt test diff --git a/java-client/README.md b/java-client/README.md deleted file mode 100644 index 406ea57..0000000 --- a/java-client/README.md +++ /dev/null @@ -1,278 +0,0 @@ -# apollo-openapi-client - -Apollo OpenAPI -- API version: 1.0.0 - - Build date: 2025-09-14T17:08:15.997407+08:00[Asia/Shanghai] - - Generator version: 7.15.0 - -Apollo配置中心OpenAPI接口文档 - -## 认证方式 - -所有API接口都需要通过Authorization header进行身份验证。 - -### 获取Token的方式: - -1. **Portal管理界面获取**: - - 登录Apollo Portal管理界面 - - 进入\"管理员工具\" -> \"开放平台授权管理\" - - 创建第三方应用,获取Token - -2. **Token格式**: - ``` - Authorization: token_value - ``` - -3. **Token权限**: - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - -### 使用示例: -```bash -curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ - -H \"Authorization: your_token_here\" -``` - - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - - -## Requirements - -Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - com.apollo - apollo-openapi-client - 0.0.1 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy - repositories { - mavenCentral() // Needed if the 'apollo-openapi-client' jar has been published to maven central. - mavenLocal() // Needed if the 'apollo-openapi-client' jar has been published to the local maven repo. - } - - dependencies { - implementation "com.apollo:apollo-openapi-client:0.0.1" - } -``` - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/apollo-openapi-client-0.0.1.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java - -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.model.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - Object result = apiInstance.openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AppManagementApi* | [**openapiV1AppsAppIdAppnamespacesNamespaceNameDelete**](docs/AppManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace -*AppManagementApi* | [**openapiV1AppsAppIdDelete**](docs/AppManagementApi.md#openapiV1AppsAppIdDelete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 -*AppManagementApi* | [**openapiV1AppsAppIdEnvClustersGet**](docs/AppManagementApi.md#openapiV1AppsAppIdEnvClustersGet) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 -*AppManagementApi* | [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete**](docs/AppManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace -*AppManagementApi* | [**openapiV1AppsAppIdGet**](docs/AppManagementApi.md#openapiV1AppsAppIdGet) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 -*AppManagementApi* | [**openapiV1AppsAppIdMissEnvsGet**](docs/AppManagementApi.md#openapiV1AppsAppIdMissEnvsGet) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 -*AppManagementApi* | [**openapiV1AppsAppIdNamespacesReleasesStatusGet**](docs/AppManagementApi.md#openapiV1AppsAppIdNamespacesReleasesStatusGet) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 -*AppManagementApi* | [**openapiV1AppsAppIdNavtreeGet**](docs/AppManagementApi.md#openapiV1AppsAppIdNavtreeGet) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 -*AppManagementApi* | [**openapiV1AppsAppIdPut**](docs/AppManagementApi.md#openapiV1AppsAppIdPut) | **PUT** /openapi/v1/apps/{appId} | 更新应用 -*AppManagementApi* | [**openapiV1AppsBySelfGet**](docs/AppManagementApi.md#openapiV1AppsBySelfGet) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) -*AppManagementApi* | [**openapiV1AppsEnvsEnvPost**](docs/AppManagementApi.md#openapiV1AppsEnvsEnvPost) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 -*AppManagementApi* | [**openapiV1AppsGet**](docs/AppManagementApi.md#openapiV1AppsGet) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 -*AppManagementApi* | [**openapiV1AppsPost**](docs/AppManagementApi.md#openapiV1AppsPost) | **POST** /openapi/v1/apps | 创建应用 -*ClusterManagementApi* | [**openapiV1AppsAppIdClustersClusterNameGet**](docs/ClusterManagementApi.md#openapiV1AppsAppIdClustersClusterNameGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 -*ClusterManagementApi* | [**openapiV1AppsAppIdClustersPost**](docs/ClusterManagementApi.md#openapiV1AppsAppIdClustersPost) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 -*ClusterManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete**](docs/ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 -*ClusterManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet**](docs/ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 -*ClusterManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet**](docs/ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace -*InstanceManagementApi* | [**openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](docs/InstanceManagementApi.md#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 -*InstanceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 -*InstanceManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](docs/InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 -*ItemManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost**](docs/ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 -*NamespaceBranchManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost**](docs/NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 -*NamespaceManagementApi* | [**openapiV1AppnamespacesGet**](docs/NamespaceManagementApi.md#openapiV1AppnamespacesGet) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdAppnamespacesGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdAppnamespacesNamespaceNameGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdAppnamespacesPost**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesPost) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace -*NamespaceManagementApi* | [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet**](docs/NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace -*NamespaceManagementApi* | [**openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet**](docs/NamespaceManagementApi.md#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 -*NamespaceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet**](docs/NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace -*NamespaceManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet**](docs/NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 -*OrganizationManagementApi* | [**openapiV1OrganizationsGet**](docs/OrganizationManagementApi.md#openapiV1OrganizationsGet) | **GET** /openapi/v1/organizations | 获取所有组织信息 -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 -*ReleaseManagementApi* | [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 -*ReleaseManagementApi* | [**openapiV1EnvsEnvReleasesCompareGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvReleasesCompareGet) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 -*ReleaseManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdGet**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 -*ReleaseManagementApi* | [**openapiV1EnvsEnvReleasesReleaseIdRollbackPut**](docs/ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdRollbackPut) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 - - -## Documentation for Models - - - [Change](docs/Change.md) - - [ClusterDTO](docs/ClusterDTO.md) - - [EntityPairKVEntity](docs/EntityPairKVEntity.md) - - [EnvClusterInfo](docs/EnvClusterInfo.md) - - [ItemChangeSets](docs/ItemChangeSets.md) - - [ItemDTO](docs/ItemDTO.md) - - [KVEntity](docs/KVEntity.md) - - [ListItemDiffs](docs/ListItemDiffs.md) - - [ListReleaseBO](docs/ListReleaseBO.md) - - [MapString](docs/MapString.md) - - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) - - [NamespaceIdentifier](docs/NamespaceIdentifier.md) - - [NamespaceReleaseDTO](docs/NamespaceReleaseDTO.md) - - [NamespaceSyncModel](docs/NamespaceSyncModel.md) - - [NamespaceTextModel](docs/NamespaceTextModel.md) - - [OpenAppDTO](docs/OpenAppDTO.md) - - [OpenAppNamespaceDTO](docs/OpenAppNamespaceDTO.md) - - [OpenClusterDTO](docs/OpenClusterDTO.md) - - [OpenCreateAppDTO](docs/OpenCreateAppDTO.md) - - [OpenEnvClusterDTO](docs/OpenEnvClusterDTO.md) - - [OpenGrayReleaseRuleDTO](docs/OpenGrayReleaseRuleDTO.md) - - [OpenGrayReleaseRuleItemDTO](docs/OpenGrayReleaseRuleItemDTO.md) - - [OpenInstanceConfigDTO](docs/OpenInstanceConfigDTO.md) - - [OpenInstanceDTO](docs/OpenInstanceDTO.md) - - [OpenItemDTO](docs/OpenItemDTO.md) - - [OpenNamespaceDTO](docs/OpenNamespaceDTO.md) - - [OpenNamespaceLockDTO](docs/OpenNamespaceLockDTO.md) - - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPageDTOOpenInstanceDTO](docs/OpenPageDTOOpenInstanceDTO.md) - - [OpenPageDTOOpenItemDTO](docs/OpenPageDTOOpenItemDTO.md) - - [OpenReleaseDTO](docs/OpenReleaseDTO.md) - - [OpenapiV1AppsGet401Response](docs/OpenapiV1AppsGet401Response.md) - - [OpenapiV1AppsPost400Response](docs/OpenapiV1AppsPost400Response.md) - - [OpenapiV1AppsPostRequest](docs/OpenapiV1AppsPostRequest.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md) - - [OpenapiV1EnvsEnvReleasesCompareGet200Response](docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - - [ReleaseDTO](docs/ReleaseDTO.md) - - - -## Documentation for Authorization - - -Authentication schemes defined for the API: - -### ApiKeyAuth - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - - - diff --git a/java-client/api/openapi.yaml b/java-client/api/openapi.yaml deleted file mode 100644 index 28267cc..0000000 --- a/java-client/api/openapi.yaml +++ /dev/null @@ -1,5527 +0,0 @@ -openapi: 3.0.1 -info: - description: | - Apollo配置中心OpenAPI接口文档 - - ## 认证方式 - - 所有API接口都需要通过Authorization header进行身份验证。 - - ### 获取Token的方式: - - 1. **Portal管理界面获取**: - - 登录Apollo Portal管理界面 - - 进入"管理员工具" -> "开放平台授权管理" - - 创建第三方应用,获取Token - - 2. **Token格式**: - ``` - Authorization: token_value - ``` - - 3. **Token权限**: - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - - ### 使用示例: - ```bash - curl -X GET "http://localhost:8070/openapi/v1/apps" \ - -H "Authorization: your_token_here" - ``` - title: Apollo OpenAPI - version: 1.0.0 -servers: -- url: / -security: -- ApiKeyAuth: [] -tags: -- description: 应用管理相关接口,包括应用的创建、查询、更新、删除等操作 - name: App Management -- description: 配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能 - name: Item Management -- description: 发布管理相关接口,包括配置发布、发布历史、灰度发布等功能 - name: Release Management -- description: 集群管理相关接口,包括集群的创建、查询、删除等操作 - name: Cluster Management -- description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 - name: Namespace Management -- description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 - name: Namespace Namespace Branch Management -- description: 实例管理相关接口,包括实例查询、配置生效状态等功能 - name: Instance Management -- description: 组织管理相关接口,包括组织信息查询等功能 - name: Organization Management -paths: - /openapi/v1/apps: - get: - deprecated: false - description: GET /openapi/v1/apps?authorized=true - parameters: - - description: 是否只返回授权的应用 - example: "true" - explode: true - in: query - name: authorized - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-10T14:20:00.000Z - dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - schema: - items: - $ref: "#/components/schemas/OpenAppDTO" - type: array - description: 成功获取授权应用列表 - "401": - content: - application/json: - example: - message: Unauthorized - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 未授权访问 - summary: 获取当前Consumer授权的应用列表 - tags: - - App Management - x-accepts: - - application/json - post: - deprecated: false - description: POST /openapi/v1/apps - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/_openapi_v1_apps_post_request" - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - schema: - $ref: "#/components/schemas/OpenAppDTO" - description: 应用创建成功 - "400": - content: - application/json: - example: - message: App is null - exception: BadRequestException - schema: - $ref: "#/components/schemas/_openapi_v1_apps_post_400_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建应用 - tags: - - App Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/apps/{appId}/env-clusters: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/env-clusters" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - env: DEV - clusters: - - default - - test-cluster - - env: UAT - clusters: - - default - - env: PRO - clusters: - - default - - backup - schema: - items: - $ref: "#/components/schemas/OpenEnvClusterDTO" - type: array - description: 成功获取应用环境集群信息 - "404": - content: - application/json: - example: - message: "App not found: invalid-app-id" - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 应用不存在 - summary: 获取应用的环境集群信息 - tags: - - App Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - message: App deleted successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 应用删除成功 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足,需要超级管理员权限 - "404": - content: - application/json: - example: - message: "App not found: invalid-app-id" - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 应用不存在 - summary: 删除应用 - tags: - - App Management - x-accepts: - - application/json - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T15:45:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - schema: - $ref: "#/components/schemas/OpenAppDTO" - description: 成功获取应用信息 - "404": - content: - application/json: - example: - message: "App not found: invalid-app-id" - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 应用不存在 - summary: 获取单个应用信息 - tags: - - App Management - x-accepts: - - application/json - put: - deprecated: false - description: "PUT /openapi/v1/apps/{appId}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - description: "" - required: - - appId - - name - - orgId - - orgName - - ownerName - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T16:45:00.000Z - name: Updated Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - schema: - $ref: "#/components/schemas/OpenAppDTO" - description: "" - "400": - content: - application/json: - example: - message: Invalid app data - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 更新应用 - tags: - - App Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/apps/by-self: - get: - deprecated: false - description: GET /openapi/v1/apps/by-self - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-10T09:15:00.000Z - dataChangeLastModifiedTime: 2024-01-18T14:30:00.000Z - name: Order Service - appId: order-service - orgId: business - orgName: Business Team - ownerName: Business Team - ownerEmail: business@company.com - schema: - items: - $ref: "#/components/schemas/OpenAppDTO" - type: array - description: 成功获取Consumer的应用列表 - "401": - content: - application/json: - example: - message: Unauthorized - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 未授权访问 - summary: 获取当前Consumer的应用列表(分页) - tags: - - App Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/navtree: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/navtree" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - env: DEV - clusters: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: apollo - dataChangeLastModifiedByDisplayName: apollo - dataChangeCreatedTime: 2023-01-01T00:00:00.000Z - dataChangeLastModifiedTime: 2023-01-01T00:00:00.000Z - id: 1 - name: default - appId: sample-app - parentClusterId: 0 - comment: Default cluster - schema: - items: - $ref: "#/components/schemas/EnvClusterInfo" - type: array - description: 成功获取应用导航树 - summary: 获取应用导航树 - tags: - - App Management - x-accepts: - - application/json - /openapi/v1/apps/envs/{env}: - post: - deprecated: false - description: "POST /openapi/v1/apps/envs/{env}" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - description: "" - required: - - appId - - name - - orgId - - orgName - - ownerName - type: object - required: true - responses: - "200": - content: - application/json: - example: - message: App created in environment successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 应用在指定环境创建成功 - "400": - content: - application/json: - example: - message: appId should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 在指定环境创建应用 - tags: - - App Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/apps/{appId}/miss_envs: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/miss_envs" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - UAT - - PRO - schema: - items: - type: string - type: array - description: 成功获取应用缺失的环境列表 - "404": - content: - application/json: - example: - message: App not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 应用不存在 - summary: 查找缺失的环境 - tags: - - App Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: - delete: - deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 删除配置项 - tags: - - Item Management - x-accepts: - - application/json - get: - deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - schema: - $ref: "#/components/schemas/OpenItemDTO" - description: 成功获取配置项 - "404": - content: - application/json: - example: - message: Configuration item not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项不存在 - summary: 获取单个配置项 - tags: - - Item Management - x-accepts: - - application/json - put: - deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - example: "false" - explode: true - in: query - name: createIfNotExists - required: true - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeLastModifiedBy - - key - - value - type: object - required: true - responses: - "200": - content: - application/json: - example: - message: Configuration item updated successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项更新成功 - "400": - content: - application/json: - example: - message: "key, value and dataChangeLastModifiedBy should not be null\ - \ or empty" - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - "404": - content: - application/json: - example: - message: Configuration item not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项不存在 - summary: 更新配置项 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - get: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 50 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 50 - total: 3 - content: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - key: spring.datasource.url - type: 0 - value: jdbc:mysql://localhost:3306/apollo - comment: 数据库连接地址 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - key: logging.level.root - type: 0 - value: INFO - comment: 日志级别配置 - schema: - $ref: "#/components/schemas/OpenPageDTOOpenItemDTO" - description: 成功获取配置项列表 - "404": - content: - application/json: - example: - message: Namespace not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 命名空间不存在 - summary: 获取命名空间下的配置项列表 - tags: - - Item Management - x-accepts: - - application/json - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeCreatedBy - - key - - value - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - schema: - $ref: "#/components/schemas/OpenItemDTO" - description: 配置项创建成功 - "400": - content: - application/json: - example: - message: key and dataChangeCreatedBy should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建新的配置项 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: - delete: - deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 通过编码的key删除配置项 - tags: - - Item Management - x-accepts: - - application/json - get: - deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: spring.datasource.url - type: 0 - value: jdbc:mysql://localhost:3306/apollo?useUnicode=true&characterEncoding=utf8 - comment: 数据库连接地址,包含特殊字符 - schema: - $ref: "#/components/schemas/OpenItemDTO" - description: 成功获取配置项(支持编码key) - "404": - content: - application/json: - example: - message: Configuration item not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项不存在 - summary: 通过查询参数获取配置项(支持编码的key) - tags: - - Item Management - x-accepts: - - application/json - put: - deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - example: "false" - explode: true - in: query - name: createIfNotExists - required: true - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenItemDTO" - description: "" - required: - - dataChangeLastModifiedBy - - key - - value - type: object - required: true - responses: - "200": - content: - application/json: - example: - message: Configuration item updated successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项更新成功(编码key) - "400": - content: - application/json: - example: - message: "key, value and dataChangeLastModifiedBy should not be null\ - \ or empty" - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - "404": - content: - application/json: - example: - message: Configuration item not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项不存在 - summary: 通过编码的key更新配置项 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: - put: - deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" - required: - - configText - - format - - operator - type: object - required: true - responses: - "200": - content: - application/json: - example: - message: Batch update configuration items successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 批量更新配置项成功 - "400": - content: - application/json: - example: - message: operator should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 通过文本批量修改配置项 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - get: - deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: feature.new-feature - type: 0 - value: enabled - comment: 新功能开关,分支测试中 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: test.debug.level - type: 0 - value: verbose - comment: 测试调试级别 - schema: - items: - $ref: "#/components/schemas/OpenItemDTO" - type: array - description: 成功获取分支下的配置项列表 - "404": - content: - application/json: - example: - message: Branch not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 分支不存在 - summary: 获取分支下的配置项 - tags: - - Namespace Branch Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare: - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" - required: - - syncItems - - syncToNamespaces - type: object - required: true - responses: - "200": - content: - application/json: - example: - - namespace: - appId: "" - env: "" - clusterName: "" - namespaceName: "" - diffs: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - createItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - updateItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - deleteItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - extInfo: "" - schema: - items: - $ref: "#/components/schemas/ListItemDiffs" - type: array - description: 成功对比命名空间配置差异 - summary: 对比命名空间配置差异 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync: - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" - required: - - syncItems - - syncToNamespaces - type: object - required: true - responses: - "200": - content: - application/json: - example: - message: Configuration items synced successfully to target namespaces - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项同步成功 - "400": - content: - application/json: - example: - message: syncToNamespaces should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 同步配置项到多个命名空间 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" - required: - - configText - - format - type: object - required: true - responses: - "200": - content: - application/json: - example: - valid: true - message: Configuration syntax is valid - schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response" - description: 配置文本语法验证通过 - "400": - content: - application/json: - example: - valid: false - message: Configuration syntax validation failed - errors: - - "Line 3: Invalid property format" - - "Line 7: Missing value for key \"database.port\"" - schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response" - description: 配置文本语法错误 - summary: 验证配置文本语法 - tags: - - Item Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - message: Configuration changes reverted successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 配置项更改撤销成功 - "400": - content: - application/json: - example: - message: Invalid revert request - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 撤销配置项更改 - tags: - - Item Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/clusters/{clusterName}: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - name: production - appId: sample-app - schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 成功获取集群信息 - "404": - content: - application/json: - example: - message: Cluster not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群不存在 - summary: 获取指定集群信息 - tags: - - Cluster Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/clusters: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/clusters" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenClusterDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - name - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: test-cluster - appId: sample-app - schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 集群创建成功 - "400": - content: - application/json: - example: - message: name and dataChangeCreatedBy should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建集群 - tags: - - Cluster Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - message: Cluster deleted successfully - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群删除成功 - "400": - content: - application/json: - example: - message: Cannot delete cluster with existing configurations - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 删除失败,集群可能包含配置 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - "404": - content: - application/json: - example: - message: Cluster not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群不存在 - summary: 删除集群 - tags: - - Cluster Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: - post: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12345 - appId: sample-app - clusterName: default - namespaceName: application - name: Release v1.0.0 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - comment: 首次发布,包含基础配置 - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: 发布创建成功 - "400": - content: - application/json: - example: - message: Params(releaseTitle and releasedBy) can not be empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 发布参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建发布 - tags: - - Release Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: - get: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12345 - appId: sample-app - clusterName: default - namespaceName: application - name: Release v1.2.0 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - app.version: 1.2.0 - comment: 最新生产发布版本,包含性能优化 - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: 成功获取最新活跃发布 - "404": - content: - application/json: - example: - message: No active release found for this namespace - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 未找到活跃发布 - summary: 获取最新活跃发布 - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: - post: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: deleteBranch - required: true - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12346 - appId: sample-app - clusterName: default - namespaceName: application - name: Merge from branch feature-123 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - feature.new-feature: enabled - comment: 合并功能分支到主分支,包含新功能配置 - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: 分支合并成功 - "400": - content: - application/json: - example: - message: releaseTitle and releasedBy should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 合并参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 合并分支 - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: - post: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 创建灰度发布 - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: - post: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceGrayDelReleaseDTO" - description: "" - required: - - grayDelKeys - - releaseTitle - - releasedBy - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 创建灰度删除发布 - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/releases/{releaseId}/rollback: - put: - deprecated: false - description: "" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: releaseId - required: true - schema: - type: integer - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 回滚发布 - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/releases/{releaseId}: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/{releaseId}" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: releaseId - required: true - schema: - type: integer - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 获取发布详情 - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 5 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - baseInfo: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - releaseKey: "" - name: "" - appId: "" - clusterName: "" - namespaceName: "" - configurations: "" - comment: "" - isAbandoned: false - items: - - key: "" - value: "" - schema: - items: - $ref: "#/components/schemas/ListReleaseBO" - type: array - description: "" - summary: 获取所有发布(分页) - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 5 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - items: - $ref: "#/components/schemas/OpenReleaseDTO" - type: array - description: "" - summary: 获取活跃发布(分页) - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/releases/compare: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/compare" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: baseReleaseId - required: true - schema: - type: integer - style: form - - description: "" - explode: true - in: query - name: toCompareReleaseId - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - changes: - - type: "" - entity: - firstEntity: - key: "" - value: "" - secondEntity: - key: "" - value: "" - schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__releases_compare_get_200_response" - description: "" - summary: 对比发布 - tags: - - Release Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - type: integer - description: "" - summary: 获取命名空间下的实例数量 - tags: - - Instance Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/releases/{releaseId}/instances: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: releaseId - required: true - schema: - type: integer - style: simple - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 20 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 0 - total: 0 - content: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - $ref: "#/components/schemas/OpenPageDTOOpenInstanceDTO" - description: "" - summary: 根据发布版本查询实例(支持分页) - tags: - - Instance Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 排除的发布ID列表,用逗号分隔 - explode: true - in: query - name: excludeReleases - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - items: - $ref: "#/components/schemas/OpenInstanceDTO" - type: array - description: "" - summary: 查询不在指定发布版本中的实例 - tags: - - Instance Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/appnamespaces: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - items: - $ref: "#/components/schemas/OpenAppNamespaceDTO" - type: array - description: "" - summary: 获取指定应用的AppNamespace - tags: - - Namespace Management - x-accepts: - - application/json - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/appnamespaces" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - format - - name - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: database - appId: sample-app - format: properties - isPublic: false - appendNamespacePrefix: true - comment: 数据库相关配置命名空间 - schema: - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: AppNamespace创建成功 - "400": - content: - application/json: - example: - message: "appId, name, format and dataChangeCreatedBy should not be\ - \ null or empty" - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": - content: - application/json: - example: - message: Access is denied - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建AppNamespace - tags: - - Namespace Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: fillItemDetail - required: true - schema: - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - items: - $ref: "#/components/schemas/OpenNamespaceDTO" - type: array - description: "" - summary: 获取指定集群下的所有Namespace - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: fillItemDetail - required: true - schema: - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 获取指定的Namespace - tags: - - Cluster Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - namespaceName: "" - isLocked: false - lockedBy: "" - schema: - $ref: "#/components/schemas/OpenNamespaceLockDTO" - description: "" - summary: 获取Namespace的锁状态 - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/appnamespaces: - get: - deprecated: false - description: GET /openapi/v1/appnamespaces?public=true - parameters: - - description: "" - example: "false" - explode: true - in: query - name: publicOnly - required: true - schema: - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - items: - $ref: "#/components/schemas/OpenAppNamespaceDTO" - type: array - description: "" - summary: 获取所有公共AppNamespace - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 删除AppNamespace - tags: - - App Management - x-accepts: - - application/json - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" - summary: 获取指定的AppNamespace - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/namespaces/releases/status: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/namespaces/releases/status" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - ? "" - : ? "" - : false - schema: - additionalProperties: - additionalProperties: - type: boolean - type: object - type: object - description: "" - summary: 获取应用下所有Namespace的发布状态 - tags: - - App Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: publicNamespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 10 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - items: - $ref: "#/components/schemas/OpenNamespaceDTO" - type: array - description: "" - summary: 获取公共AppNamespace的所有实例 - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 获取关联的公共Namespace - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - "" - schema: - items: - type: string - type: array - description: "" - summary: 检查缺失的Namespace - tags: - - Namespace Management - x-accepts: - - application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 删除关联的Namespace - tags: - - App Management - x-accepts: - - application/json - /openapi/v1/organizations: - get: - deprecated: false - description: GET /openapi/v1/organizations - responses: - "200": - content: - application/json: - example: - - orgId: default - orgName: Default Organization - - orgId: microservices - orgName: Microservices Team - - orgId: infrastructure - orgName: Infrastructure Team - schema: - description: 组织列表 - items: - $ref: "#/components/schemas/OpenOrganizationDto" - type: array - description: 成功获取组织列表 - "401": - content: - application/json: - example: - message: Unauthorized - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 未授权访问 - summary: 获取所有组织信息 - tags: - - Organization Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - appId: sample-app - clusterName: default - namespaceName: application - comment: 功能分支,用于测试新特性 - format: properties - isPublic: false - items: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: feature.new-feature - type: 0 - value: enabled - comment: 新功能开关 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: test.mode - type: 0 - value: debug - comment: 测试模式配置 - schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - "404": - content: - application/json: - example: - message: Branch not found for this namespace - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 分支不存在 - summary: 获取命名空间分支信息 - tags: - - Cluster Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" - summary: 创建命名空间分支 - tags: - - Namespace Branch Management - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 删除命名空间分支 - tags: - - Namespace Branch Management - x-accepts: - - application/json - patch: - deprecated: false - description: |- - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: deleteBranch - required: true - schema: - type: boolean - style: form - - description: "" - explode: false - in: header - name: X-Apollo-Operator - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" - required: - - releaseTitle - - releasedBy - type: object - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: "#/components/schemas/OpenReleaseDTO" - description: "" - summary: 合并分支到主分支 - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: - - application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - branchName: "" - ruleItems: - - clientAppId: "" - clientIpList: - - "" - clientLabelList: - - "" - schema: - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" - summary: 获取分支灰度发布规则 - tags: - - Namespace Branch Management - x-accepts: - - application/json - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: header - name: operator - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" - required: - - ruleItems - type: object - required: true - responses: - "200": - content: - application/json: - schema: - properties: {} - type: object - description: "" - summary: 更新分支灰度发布规则 - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: - - application/json -components: - schemas: - OpenAppDTO: - description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - example: - dataChangeCreatedTime: dataChangeCreatedTime - orgName: orgName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - ownerName: ownerName - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - dataChangeLastModifiedTime: dataChangeLastModifiedTime - orgId: orgId - ownerEmail: ownerEmail - properties: - dataChangeCreatedBy: - description: 数据创建者用户名,记录是谁创建了这个应用 - type: string - dataChangeLastModifiedBy: - description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 - type: string - dataChangeCreatedTime: - description: 数据创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 数据最后修改时间,ISO 8601格式的时间戳 - type: string - name: - description: 应用名称,用于显示的友好名称 - type: string - appId: - description: 应用唯一标识符,全局唯一的应用ID - type: string - orgId: - description: 组织ID,应用所属组织的唯一标识 - type: string - orgName: - description: 组织名称,应用所属组织的显示名称 - type: string - ownerName: - description: 应用负责人姓名,应用的主要负责人 - type: string - ownerEmail: - description: 应用负责人邮箱地址,用于接收应用相关通知 - type: string - type: object - OpenCreateAppDTO: - description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - properties: - assignAppRoleToSelf: - description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - type: boolean - admins: - description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - items: - type: string - type: array - app: - $ref: "#/components/schemas/OpenAppDTO" - type: object - OpenItemDTO: - description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime - key: key - properties: - dataChangeCreatedBy: - description: 配置项创建者用户名,记录是谁创建了这个配置项 - type: string - dataChangeLastModifiedBy: - description: 配置项最后修改者用户名,记录最后一次修改配置的用户 - type: string - dataChangeCreatedTime: - description: 配置项创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 配置项最后修改时间,ISO 8601格式的时间戳 - type: string - key: - description: 配置项的键名,在同一命名空间内唯一标识一个配置项 - type: string - type: - description: 配置项类型,0表示普通配置项,1表示文件类型配置项 - type: integer - value: - description: 配置项的值,可以是字符串、数字、JSON等格式 - type: string - comment: - description: 配置项的注释说明,用于描述配置项的用途和含义 - type: string - type: object - OpenPageDTOOpenItemDTO: - description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - example: - total: 1 - size: 6 - page: 0 - content: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime - key: key - properties: - page: - description: 当前页码,从0开始计数 - type: integer - size: - description: 每页显示的记录数量 - type: integer - total: - description: 总记录数,符合查询条件的配置项总数量 - format: int64 - type: integer - content: - description: 当前页的配置项列表,包含具体的配置项数据 - items: - $ref: "#/components/schemas/OpenItemDTO" - type: array - type: object - OpenClusterDTO: - description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: 集群创建者用户名,记录是谁创建了这个集群 - type: string - dataChangeLastModifiedBy: - description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 - type: string - dataChangeCreatedTime: - description: 集群创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 集群最后修改时间,ISO 8601格式的时间戳 - type: string - name: - description: 集群名称,在同一应用和环境下唯一标识一个集群 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - type: object - MapString: - description: 字符串映射对象,用于表示键值对的配置数据结构 - example: - key: key - properties: - key: - type: string - type: object - OpenReleaseDTO: - description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 发布创建者用户名,记录是谁创建了这次发布 - type: string - dataChangeLastModifiedBy: - description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 - type: string - dataChangeCreatedTime: - description: 发布创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 发布最后修改时间,ISO 8601格式的时间戳 - type: string - id: - description: 发布记录的唯一标识符,系统自动生成 - format: int64 - type: integer - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 所属命名空间的名称 - type: string - name: - description: 发布名称,用于标识这次发布的版本或描述 - type: string - configurations: - $ref: "#/components/schemas/MapString" - comment: - description: 发布备注,描述本次发布的变更内容和目的 - type: string - type: object - NamespaceReleaseDTO: - description: 命名空间发布请求数据传输对象,用于创建新的配置发布 - example: - releaseComment: releaseComment - releasedBy: releasedBy - releaseTitle: releaseTitle - isEmergencyPublish: true - properties: - releaseTitle: - description: 发布标题,用于标识这次发布的名称或版本号 - type: string - releaseComment: - description: 发布备注,详细描述本次发布的变更内容和目的 - type: string - releasedBy: - description: 发布操作者用户名,记录是谁执行了这次发布操作 - type: string - isEmergencyPublish: - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - type: boolean - type: object - NamespaceGrayDelReleaseDTO: - description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - example: - releaseComment: releaseComment - releasedBy: releasedBy - grayDelKeys: - - grayDelKeys - - grayDelKeys - releaseTitle: releaseTitle - isEmergencyPublish: true - properties: - releaseTitle: - description: 发布标题,用于标识这次灰度删除发布的名称或版本号 - type: string - releaseComment: - description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - type: string - releasedBy: - description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - type: string - isEmergencyPublish: - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - type: boolean - grayDelKeys: - description: 需要在灰度发布中删除的配置项键名列表 - items: - type: string - type: array - type: object - OpenAppNamespaceDTO: - description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appendNamespacePrefix: true - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - format: format - isPublic: true - comment: comment - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - type: string - dataChangeLastModifiedBy: - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - type: string - dataChangeCreatedTime: - description: 命名空间创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - type: string - name: - description: 命名空间名称,在同一应用内唯一标识一个命名空间 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - format: - description: 命名空间格式类型,如properties、xml、json、yml等 - type: string - isPublic: - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - type: boolean - appendNamespacePrefix: - default: true - description: 对于公共命名空间,是否在命名空间名称前添加前缀 - type: boolean - comment: - description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 - type: string - type: object - OpenGrayReleaseRuleItemDTO: - description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - example: - clientIpList: - - clientIpList - - clientIpList - clientLabelList: - - clientLabelList - - clientLabelList - clientAppId: clientAppId - properties: - clientAppId: - description: 客户端应用ID,指定哪个应用可以获取灰度配置 - type: string - clientIpList: - description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - items: - type: string - type: array - clientLabelList: - description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - items: - type: string - type: array - type: object - OpenGrayReleaseRuleDTO: - description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - branchName: branchName - ruleItems: - - clientIpList: - - clientIpList - - clientIpList - clientLabelList: - - clientLabelList - - clientLabelList - clientAppId: clientAppId - - clientIpList: - - clientIpList - - clientIpList - clientLabelList: - - clientLabelList - - clientLabelList - clientAppId: clientAppId - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - type: string - dataChangeLastModifiedBy: - description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - type: string - dataChangeCreatedTime: - description: 灰度规则创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 灰度规则最后修改时间,ISO 8601格式的时间戳 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 所属命名空间的名称 - type: string - branchName: - description: 灰度分支名称,标识灰度发布的分支 - type: string - ruleItems: - description: 灰度发布规则项列表,包含具体的灰度规则条件 - items: - $ref: "#/components/schemas/OpenGrayReleaseRuleItemDTO" - type: array - type: object - OpenNamespaceDTO: - description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - format: format - isPublic: true - comment: comment - items: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: dataChangeLastModifiedTime - key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 命名空间创建者用户名,记录是谁创建了这个命名空间 - type: string - dataChangeLastModifiedBy: - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - type: string - dataChangeCreatedTime: - description: 命名空间创建时间,ISO 8601格式的时间戳 - type: string - dataChangeLastModifiedTime: - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - type: string - comment: - description: 命名空间备注说明,描述命名空间的用途 - type: string - format: - description: 命名空间格式类型,如properties、xml、json、yml等 - type: string - isPublic: - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - type: boolean - items: - description: 命名空间包含的配置项列表 - items: - $ref: "#/components/schemas/OpenItemDTO" - type: array - type: object - OpenNamespaceLockDTO: - description: Apollo命名空间锁状态数据传输对象 - example: - lockedBy: lockedBy - isLocked: true - namespaceName: namespaceName - properties: - namespaceName: - description: 命名空间名称 - type: string - isLocked: - description: 是否被锁定 - type: boolean - lockedBy: - description: 锁定者用户名 - type: string - type: object - OpenPageDTOOpenInstanceDTO: - description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 - example: - total: 1 - size: 6 - page: 0 - content: - - configs: - - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - - configs: - - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - properties: - page: - description: 当前页码,从0开始计数 - type: integer - size: - description: 每页显示的记录数量 - type: integer - total: - description: 总记录数,符合查询条件的实例总数量 - format: int64 - type: integer - content: - description: 当前页的实例列表,包含具体的实例数据 - items: - $ref: "#/components/schemas/OpenInstanceDTO" - type: array - type: object - OpenEnvClusterDTO: - example: - env: env - clusters: - - clusters - - clusters - properties: - env: - description: "" - type: string - clusters: - description: "" - items: - type: string - type: array - type: object - ClusterDTO: - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - name: - description: "" - pattern: "[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*" - type: string - appId: - description: "" - type: string - parentClusterId: - description: "" - format: int64 - type: integer - comment: - description: "" - type: string - required: - - appId - - name - type: object - EnvClusterInfo: - example: - env: env - clusters: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - env: - description: "" - type: string - clusters: - description: "" - items: - $ref: "#/components/schemas/ClusterDTO" - type: array - type: object - NamespaceTextModel: - example: - configText: configText - namespaceId: 0 - appId: appId - clusterName: clusterName - format: format - env: env - namespaceName: namespaceName - operator: operator - properties: - appId: - description: "" - type: string - env: - description: "" - type: string - clusterName: - description: "" - type: string - namespaceName: - description: "" - type: string - namespaceId: - description: "" - format: int64 - type: integer - format: - description: "" - type: string - configText: - description: "" - type: string - operator: - description: "" - type: string - type: object - NamespaceIdentifier: - example: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - properties: - appId: - description: "" - type: string - env: - description: "" - type: string - clusterName: - description: "" - type: string - namespaceName: - description: "" - type: string - type: object - ItemDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - namespaceId: - description: "" - format: int64 - type: integer - key: - description: "" - type: string - type: - description: "" - type: integer - value: - description: "" - type: string - comment: - description: "" - type: string - lineNum: - description: "" - type: integer - type: object - ItemChangeSets: - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - deleteItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - createItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - updateItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - createItems: - default: [] - description: "" - items: - $ref: "#/components/schemas/ItemDTO" - type: array - updateItems: - default: [] - description: "" - items: - $ref: "#/components/schemas/ItemDTO" - type: array - deleteItems: - default: [] - description: "" - items: - $ref: "#/components/schemas/ItemDTO" - type: array - type: object - ListItemDiffs: - example: - namespace: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - diffs: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - deleteItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - createItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - updateItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - dataChangeLastModifiedTime: dataChangeLastModifiedTime - extInfo: extInfo - properties: - namespace: - $ref: "#/components/schemas/NamespaceIdentifier" - diffs: - $ref: "#/components/schemas/ItemChangeSets" - extInfo: - description: "" - type: string - type: object - NamespaceSyncModel: - example: - syncItems: - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - syncToNamespaces: - - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - properties: - syncToNamespaces: - description: "" - items: - $ref: "#/components/schemas/NamespaceIdentifier" - type: array - syncItems: - description: "" - items: - $ref: "#/components/schemas/ItemDTO" - type: array - type: object - ReleaseDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - releaseKey: - description: "" - type: string - name: - description: "" - type: string - appId: - description: "" - type: string - clusterName: - description: "" - type: string - namespaceName: - description: "" - type: string - configurations: - description: "" - type: string - comment: - description: "" - type: string - isAbandoned: - description: "" - type: boolean - type: object - KVEntity: - example: - value: value - key: key - properties: - key: - description: "" - type: string - value: - description: "" - type: string - type: object - ListReleaseBO: - example: - baseInfo: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - items: - - value: value - key: key - - value: value - key: key - properties: - baseInfo: - $ref: "#/components/schemas/ReleaseDTO" - items: - description: "" - items: - $ref: "#/components/schemas/KVEntity" - type: array - type: object - EntityPairKVEntity: - example: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - firstEntity: - $ref: "#/components/schemas/KVEntity" - secondEntity: - $ref: "#/components/schemas/KVEntity" - type: object - Change: - example: - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - type: - description: "" - enum: - - ADDED - - MODIFIED - - DELETED - type: string - entity: - $ref: "#/components/schemas/EntityPairKVEntity" - type: object - OpenInstanceConfigDTO: - example: - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - release: - $ref: "#/components/schemas/OpenReleaseDTO" - releaseDeliveryTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - type: object - OpenInstanceDTO: - example: - configs: - - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - - releaseDeliveryTime: releaseDeliveryTime - release: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - configurations: - key: key - appId: appId - clusterName: clusterName - dataChangeCreatedBy: dataChangeCreatedBy - name: name - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - namespaceName: namespaceName - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeCreatedTime: dataChangeCreatedTime - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - properties: - id: - description: "" - format: int64 - type: integer - appId: - description: "" - type: string - clusterName: - description: "" - type: string - dataCenter: - description: "" - type: string - ip: - description: "" - type: string - configs: - description: "" - items: - $ref: "#/components/schemas/OpenInstanceConfigDTO" - type: array - dataChangeCreatedTime: - description: "" - type: string - type: object - OpenOrganizationDto: - example: - orgName: orgName - orgId: orgId - properties: - orgId: - description: "" - type: string - orgName: - description: "" - type: string - type: object - _openapi_v1_apps_get_401_response: - example: - message: message - properties: - message: - type: string - type: object - _openapi_v1_apps_post_request: - allOf: - - $ref: "#/components/schemas/OpenCreateAppDTO" - description: "" - properties: - app: - allOf: - - $ref: "#/components/schemas/OpenAppDTO" - required: - - appId - - name - - orgId - - orgName - - ownerName - required: - - admins - - app - - assignAppRoleToSelf - type: object - _openapi_v1_apps_post_400_response: - example: - exception: exception - message: message - properties: - message: - type: string - exception: - type: string - type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response: - example: - valid: true - message: message - properties: - valid: - type: boolean - message: - type: string - type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response: - example: - valid: true - message: message - errors: - - errors - - errors - properties: - valid: - type: boolean - message: - type: string - errors: - items: - type: string - type: array - type: object - _openapi_v1_envs__env__releases_compare_get_200_response: - example: - changes: - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - changes: - items: - $ref: "#/components/schemas/Change" - type: array - type: object - securitySchemes: - ApiKeyAuth: - description: | - Apollo OpenAPI访问令牌 - **获取方式:** - 1. 登录Apollo Portal管理界面 - 2. 进入"管理员工具" -> "开放平台授权管理" - 3. 创建第三方应用,获取Token - **使用格式:** - ``` - Authorization: your_token_here - ``` - **权限说明:** - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - in: header - name: Authorization - type: apiKey - diff --git a/java-client/build.gradle b/java-client/build.gradle deleted file mode 100644 index bccfa03..0000000 --- a/java-client/build.gradle +++ /dev/null @@ -1,166 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' -apply plugin: 'java' -apply plugin: 'com.diffplug.spotless' - -group = 'com.apollo' -version = '0.0.1' - -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' - } -} - -repositories { - mavenCentral() -} -sourceSets { - main.java.srcDirs = ['src/main/java'] -} - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDirectory - task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") - task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task) - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven-publish' - - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - publishing { - publications { - maven(MavenPublication) { - artifactId = 'apollo-openapi-client' - from components.java - } - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - jakarta_annotation_version = "1.3.5" -} - -dependencies { - implementation "com.google.code.findbugs:jsr305:3.0.2" - implementation 'com.squareup.okhttp3:okhttp:4.12.0' - implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' - implementation 'com.google.code.gson:gson:2.9.1' - implementation 'io.gsonfire:gson-fire:1.9.0' - implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' - implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' - implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' - testImplementation 'org.mockito:mockito-core:3.12.4' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.3' -} - -javadoc { - options.tags = [ "http.response.details:a:Http Response Details" ] -} - -// Use spotless plugin to automatically format code, remove unused import, etc -// To apply changes directly to the file, run `gradlew spotlessApply` -// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle -spotless { - // comment out below to run spotless as part of the `check` task - enforceCheck false - - format 'misc', { - // define the files (e.g. '*.gradle', '*.md') to apply `misc` to - target '.gitignore' - - // define the steps to apply to those files - trimTrailingWhitespace() - indentWithSpaces() // Takes an integer argument if you don't like 4 - endWithNewline() - } - java { - // don't need to set target, it is inferred from java - - // apply a specific flavor of google-java-format - googleJavaFormat('1.8').aosp().reflowLongStrings() - - removeUnusedImports() - importOrder() - } -} - -test { - // Enable JUnit 5 (Gradle 4.6+). - useJUnitPlatform() - - // Always run tests, even when nothing changed. - dependsOn 'cleanTest' - - // Show test results. - testLogging { - events "passed", "skipped", "failed" - } - -} diff --git a/java-client/build.sbt b/java-client/build.sbt deleted file mode 100644 index f55e8cc..0000000 --- a/java-client/build.sbt +++ /dev/null @@ -1,27 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "com.apollo", - name := "apollo-openapi-client", - version := "0.0.1", - scalaVersion := "2.11.12", - scalacOptions ++= Seq("-feature"), - compile / javacOptions ++= Seq("-Xlint:deprecation"), - Compile / packageDoc / publishArtifact := false, - resolvers += Resolver.mavenLocal, - libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.6.5", - "com.squareup.okhttp3" % "okhttp" % "4.12.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", - "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.18.0", - "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", - "org.openapitools" % "jackson-databind-nullable" % "0.2.6", - "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", - "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", - "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", - "org.junit.jupiter" % "junit-jupiter-api" % "5.10.3" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test", - "org.mockito" % "mockito-core" % "3.12.4" % "test" - ) - ) diff --git a/java-client/docs/AppManagementApi.md b/java-client/docs/AppManagementApi.md deleted file mode 100644 index 413bf52..0000000 --- a/java-client/docs/AppManagementApi.md +++ /dev/null @@ -1,939 +0,0 @@ -# AppManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1AppsAppIdAppnamespacesNamespaceNameDelete**](AppManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace | -| [**openapiV1AppsAppIdDelete**](AppManagementApi.md#openapiV1AppsAppIdDelete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 | -| [**openapiV1AppsAppIdEnvClustersGet**](AppManagementApi.md#openapiV1AppsAppIdEnvClustersGet) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 | -| [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete**](AppManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace | -| [**openapiV1AppsAppIdGet**](AppManagementApi.md#openapiV1AppsAppIdGet) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 | -| [**openapiV1AppsAppIdMissEnvsGet**](AppManagementApi.md#openapiV1AppsAppIdMissEnvsGet) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 | -| [**openapiV1AppsAppIdNamespacesReleasesStatusGet**](AppManagementApi.md#openapiV1AppsAppIdNamespacesReleasesStatusGet) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 | -| [**openapiV1AppsAppIdNavtreeGet**](AppManagementApi.md#openapiV1AppsAppIdNavtreeGet) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 | -| [**openapiV1AppsAppIdPut**](AppManagementApi.md#openapiV1AppsAppIdPut) | **PUT** /openapi/v1/apps/{appId} | 更新应用 | -| [**openapiV1AppsBySelfGet**](AppManagementApi.md#openapiV1AppsBySelfGet) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) | -| [**openapiV1AppsEnvsEnvPost**](AppManagementApi.md#openapiV1AppsEnvsEnvPost) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 | -| [**openapiV1AppsGet**](AppManagementApi.md#openapiV1AppsGet) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 | -| [**openapiV1AppsPost**](AppManagementApi.md#openapiV1AppsPost) | **POST** /openapi/v1/apps | 创建应用 | - - - -# **openapiV1AppsAppIdAppnamespacesNamespaceNameDelete** -> Object openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName) - -删除AppNamespace - -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - Object result = apiInstance.openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdDelete** -> OpenapiV1AppsGet401Response openapiV1AppsAppIdDelete(appId) - -删除应用 - -DELETE /openapi/v1/apps/{appId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1AppsAppIdDelete(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 应用删除成功 | - | -| **403** | 权限不足,需要超级管理员权限 | - | -| **404** | 应用不存在 | - | - - -# **openapiV1AppsAppIdEnvClustersGet** -> List<OpenEnvClusterDTO> openapiV1AppsAppIdEnvClustersGet(appId) - -获取应用的环境集群信息 - -GET /openapi/v1/apps/{appId}/env-clusters - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - List result = apiInstance.openapiV1AppsAppIdEnvClustersGet(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdEnvClustersGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**List<OpenEnvClusterDTO>**](OpenEnvClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取应用环境集群信息 | - | -| **404** | 应用不存在 | - | - - -# **openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete** -> Object openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName) - -删除关联的Namespace - -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - Object result = apiInstance.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdGet** -> OpenAppDTO openapiV1AppsAppIdGet(appId) - -获取单个应用信息 - -GET /openapi/v1/apps/{appId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - OpenAppDTO result = apiInstance.openapiV1AppsAppIdGet(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取应用信息 | - | -| **404** | 应用不存在 | - | - - -# **openapiV1AppsAppIdMissEnvsGet** -> List<String> openapiV1AppsAppIdMissEnvsGet(appId) - -查找缺失的环境 - -GET /openapi/v1/apps/{appId}/miss_envs - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - List result = apiInstance.openapiV1AppsAppIdMissEnvsGet(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdMissEnvsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -**List<String>** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取应用缺失的环境列表 | - | -| **404** | 应用不存在 | - | - - -# **openapiV1AppsAppIdNamespacesReleasesStatusGet** -> Map<String, Map<String, Boolean>> openapiV1AppsAppIdNamespacesReleasesStatusGet(appId) - -获取应用下所有Namespace的发布状态 - -GET /openapi/v1/apps/{appId}/namespaces/releases/status - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - Map> result = apiInstance.openapiV1AppsAppIdNamespacesReleasesStatusGet(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdNamespacesReleasesStatusGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**Map<String, Map<String, Boolean>>**](Map.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdNavtreeGet** -> List<EnvClusterInfo> openapiV1AppsAppIdNavtreeGet(appId) - -获取应用导航树 - -GET /openapi/v1/apps/{appId}/navtree - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - List result = apiInstance.openapiV1AppsAppIdNavtreeGet(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdNavtreeGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**List<EnvClusterInfo>**](EnvClusterInfo.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取应用导航树 | - | - - -# **openapiV1AppsAppIdPut** -> OpenAppDTO openapiV1AppsAppIdPut(appId, openAppDTO) - -更新应用 - -PUT /openapi/v1/apps/{appId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | - try { - OpenAppDTO result = apiInstance.openapiV1AppsAppIdPut(appId, openAppDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsAppIdPut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1AppsBySelfGet** -> List<OpenAppDTO> openapiV1AppsBySelfGet() - -获取当前Consumer的应用列表(分页) - -GET /openapi/v1/apps/by-self - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - try { - List result = apiInstance.openapiV1AppsBySelfGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsBySelfGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<OpenAppDTO>**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取Consumer的应用列表 | - | -| **401** | 未授权访问 | - | - - -# **openapiV1AppsEnvsEnvPost** -> OpenapiV1AppsGet401Response openapiV1AppsEnvsEnvPost(env, openAppDTO) - -在指定环境创建应用 - -POST /openapi/v1/apps/envs/{env} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String env = "env_example"; // String | - OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1AppsEnvsEnvPost(env, openAppDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsEnvsEnvPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 应用在指定环境创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1AppsGet** -> List<OpenAppDTO> openapiV1AppsGet(authorized) - -获取当前Consumer授权的应用列表 - -GET /openapi/v1/apps?authorized=true - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String authorized = "true"; // String | 是否只返回授权的应用 - try { - List result = apiInstance.openapiV1AppsGet(authorized); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **authorized** | **String**| 是否只返回授权的应用 | [optional] | - -### Return type - -[**List<OpenAppDTO>**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取授权应用列表 | - | -| **401** | 未授权访问 | - | - - -# **openapiV1AppsPost** -> OpenAppDTO openapiV1AppsPost(openapiV1AppsPostRequest) - -创建应用 - -POST /openapi/v1/apps - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = new OpenapiV1AppsPostRequest(); // OpenapiV1AppsPostRequest | - try { - OpenAppDTO result = apiInstance.openapiV1AppsPost(openapiV1AppsPostRequest); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#openapiV1AppsPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **openapiV1AppsPostRequest** | [**OpenapiV1AppsPostRequest**](OpenapiV1AppsPostRequest.md)| | | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 应用创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - diff --git a/java-client/docs/Change.md b/java-client/docs/Change.md deleted file mode 100644 index fcab3b7..0000000 --- a/java-client/docs/Change.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# Change - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**entity** | [**EntityPairKVEntity**](EntityPairKVEntity.md) | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| ADDED | "ADDED" | -| MODIFIED | "MODIFIED" | -| DELETED | "DELETED" | - - - diff --git a/java-client/docs/ClusterDTO.md b/java-client/docs/ClusterDTO.md deleted file mode 100644 index c936fb4..0000000 --- a/java-client/docs/ClusterDTO.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# ClusterDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**name** | **String** | | | -|**appId** | **String** | | | -|**parentClusterId** | **Long** | | [optional] | -|**comment** | **String** | | [optional] | - - - diff --git a/java-client/docs/ClusterManagementApi.md b/java-client/docs/ClusterManagementApi.md deleted file mode 100644 index 7b09868..0000000 --- a/java-client/docs/ClusterManagementApi.md +++ /dev/null @@ -1,387 +0,0 @@ -# ClusterManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1AppsAppIdClustersClusterNameGet**](ClusterManagementApi.md#openapiV1AppsAppIdClustersClusterNameGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 | -| [**openapiV1AppsAppIdClustersPost**](ClusterManagementApi.md#openapiV1AppsAppIdClustersPost) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete**](ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet**](ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet**](ClusterManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace | - - - -# **openapiV1AppsAppIdClustersClusterNameGet** -> OpenClusterDTO openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName) - -获取指定集群信息 - -GET /openapi/v1/apps/{appId}/clusters/{clusterName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - OpenClusterDTO result = apiInstance.openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1AppsAppIdClustersClusterNameGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取集群信息 | - | -| **404** | 集群不存在 | - | - - -# **openapiV1AppsAppIdClustersPost** -> OpenClusterDTO openapiV1AppsAppIdClustersPost(appId, openClusterDTO) - -创建集群 - -POST /openapi/v1/apps/{appId}/clusters - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenClusterDTO openClusterDTO = new OpenClusterDTO(); // OpenClusterDTO | - try { - OpenClusterDTO result = apiInstance.openapiV1AppsAppIdClustersPost(appId, openClusterDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1AppsAppIdClustersPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openClusterDTO** | [**OpenClusterDTO**](OpenClusterDTO.md)| | | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 集群创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName) - -删除集群 - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 集群删除成功 | - | -| **400** | 删除失败,集群可能包含配置 | - | -| **403** | 权限不足 | - | -| **404** | 集群不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet** -> OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName) - -获取命名空间分支信息 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenNamespaceDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | -| **404** | 分支不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet** -> OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail) - -获取指定的Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Boolean fillItemDetail = true; // Boolean | - try { - OpenNamespaceDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **fillItemDetail** | **Boolean**| | | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - diff --git a/java-client/docs/EntityPairKVEntity.md b/java-client/docs/EntityPairKVEntity.md deleted file mode 100644 index c8b1d4c..0000000 --- a/java-client/docs/EntityPairKVEntity.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# EntityPairKVEntity - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**firstEntity** | [**KVEntity**](KVEntity.md) | | [optional] | -|**secondEntity** | [**KVEntity**](KVEntity.md) | | [optional] | - - - diff --git a/java-client/docs/EnvClusterInfo.md b/java-client/docs/EnvClusterInfo.md deleted file mode 100644 index 2ba034c..0000000 --- a/java-client/docs/EnvClusterInfo.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# EnvClusterInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**env** | **String** | | [optional] | -|**clusters** | [**List<ClusterDTO>**](ClusterDTO.md) | | [optional] | - - - diff --git a/java-client/docs/InstanceManagementApi.md b/java-client/docs/InstanceManagementApi.md deleted file mode 100644 index bff9b41..0000000 --- a/java-client/docs/InstanceManagementApi.md +++ /dev/null @@ -1,236 +0,0 @@ -# InstanceManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](InstanceManagementApi.md#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 | -| [**openapiV1EnvsEnvReleasesReleaseIdInstancesGet**](InstanceManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdInstancesGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) | - - - -# **openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet** -> Integer openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName) - -获取命名空间下的实例数量 - -GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - Integer result = apiInstance.openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -**Integer** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet** -> List<OpenInstanceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases) - -查询不在指定发布版本中的实例 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String excludeReleases = "excludeReleases_example"; // String | 排除的发布ID列表,用逗号分隔 - try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **excludeReleases** | **String**| 排除的发布ID列表,用逗号分隔 | [optional] | - -### Return type - -[**List<OpenInstanceDTO>**](OpenInstanceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvReleasesReleaseIdInstancesGet** -> OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size) - -根据发布版本查询实例(支持分页) - -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | - Integer releaseId = 56; // Integer | - Integer page = 0; // Integer | - Integer size = 20; // Integer | - try { - OpenPageDTOOpenInstanceDTO result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#openapiV1EnvsEnvReleasesReleaseIdInstancesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **releaseId** | **Integer**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | - -### Return type - -[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - diff --git a/java-client/docs/ItemChangeSets.md b/java-client/docs/ItemChangeSets.md deleted file mode 100644 index 235cf94..0000000 --- a/java-client/docs/ItemChangeSets.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# ItemChangeSets - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**createItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | -|**updateItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | -|**deleteItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | - - - diff --git a/java-client/docs/ItemDTO.md b/java-client/docs/ItemDTO.md deleted file mode 100644 index 06148a2..0000000 --- a/java-client/docs/ItemDTO.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# ItemDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**namespaceId** | **Long** | | [optional] | -|**key** | **String** | | [optional] | -|**type** | **Integer** | | [optional] | -|**value** | **String** | | [optional] | -|**comment** | **String** | | [optional] | -|**lineNum** | **Integer** | | [optional] | - - - diff --git a/java-client/docs/ItemManagementApi.md b/java-client/docs/ItemManagementApi.md deleted file mode 100644 index a920a17..0000000 --- a/java-client/docs/ItemManagementApi.md +++ /dev/null @@ -1,1052 +0,0 @@ -# ItemManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost**](ItemManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 | - - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator) - -通过编码的key删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - String operator = "operator_example"; // String | - try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **operator** | **String**| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet** -> OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key) - -通过查询参数获取配置项(支持编码的key) - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - try { - OpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取配置项(支持编码key) | - | -| **404** | 配置项不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) - -通过编码的key更新配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - Boolean createIfNotExists = false; // Boolean | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **createIfNotExists** | **Boolean**| | | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置项更新成功(编码key) | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | -| **404** | 配置项不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel) - -通过文本批量修改配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceTextModel namespaceTextModel = new NamespaceTextModel(); // NamespaceTextModel | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceTextModel** | [**NamespaceTextModel**](NamespaceTextModel.md)| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 批量更新配置项成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost** -> List<ListItemDiffs> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel) - -对比命名空间配置差异 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceSyncModel namespaceSyncModel = new NamespaceSyncModel(); // NamespaceSyncModel | - try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceSyncModel** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | | - -### Return type - -[**List<ListItemDiffs>**](ListItemDiffs.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功对比命名空间配置差异 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet** -> OpenPageDTOOpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size) - -获取命名空间下的配置项列表 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 50; // Integer | - try { - OpenPageDTOOpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | - -### Return type - -[**OpenPageDTOOpenItemDTO**](OpenPageDTOOpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取配置项列表 | - | -| **404** | 命名空间不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator) - -删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - String operator = "operator_example"; // String | - try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **operator** | **String**| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet** -> OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key) - -获取单个配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - try { - OpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取配置项 | - | -| **404** | 配置项不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) - -更新配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String key = "key_example"; // String | - Boolean createIfNotExists = false; // Boolean | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **createIfNotExists** | **Boolean**| | | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置项更新成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | -| **404** | 配置项不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost** -> OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO) - -创建新的配置项 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | - try { - OpenItemDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置项创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName) - -撤销配置项更改 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置项更改撤销成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost** -> OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel) - -同步配置项到多个命名空间 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceSyncModel namespaceSyncModel = new NamespaceSyncModel(); // NamespaceSyncModel | - try { - OpenapiV1AppsGet401Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceSyncModel** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置项同步成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost** -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel) - -验证配置文本语法 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceTextModel namespaceTextModel = new NamespaceTextModel(); // NamespaceTextModel | - try { - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceTextModel** | [**NamespaceTextModel**](NamespaceTextModel.md)| | | - -### Return type - -[**OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response**](OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置文本语法验证通过 | - | -| **400** | 配置文本语法错误 | - | - diff --git a/java-client/docs/KVEntity.md b/java-client/docs/KVEntity.md deleted file mode 100644 index 45c1130..0000000 --- a/java-client/docs/KVEntity.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# KVEntity - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | | [optional] | -|**value** | **String** | | [optional] | - - - diff --git a/java-client/docs/ListItemDiffs.md b/java-client/docs/ListItemDiffs.md deleted file mode 100644 index e1b3cd0..0000000 --- a/java-client/docs/ListItemDiffs.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ListItemDiffs - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespace** | [**NamespaceIdentifier**](NamespaceIdentifier.md) | | [optional] | -|**diffs** | [**ItemChangeSets**](ItemChangeSets.md) | | [optional] | -|**extInfo** | **String** | | [optional] | - - - diff --git a/java-client/docs/ListReleaseBO.md b/java-client/docs/ListReleaseBO.md deleted file mode 100644 index 22348cb..0000000 --- a/java-client/docs/ListReleaseBO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ListReleaseBO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**baseInfo** | [**ReleaseDTO**](ReleaseDTO.md) | | [optional] | -|**items** | [**List<KVEntity>**](KVEntity.md) | | [optional] | - - - diff --git a/java-client/docs/MapString.md b/java-client/docs/MapString.md deleted file mode 100644 index a8698e9..0000000 --- a/java-client/docs/MapString.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# MapString - -字符串映射对象,用于表示键值对的配置数据结构 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | | [optional] | - - - diff --git a/java-client/docs/NamespaceBranchManagementApi.md b/java-client/docs/NamespaceBranchManagementApi.md deleted file mode 100644 index 48515b9..0000000 --- a/java-client/docs/NamespaceBranchManagementApi.md +++ /dev/null @@ -1,733 +0,0 @@ -# NamespaceBranchManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost**](NamespaceBranchManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 | - - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost** -> OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator) - -创建命名空间分支 - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String operator = "operator_example"; // String | - try { - OpenNamespaceDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **operator** | **String**| | | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator) - -删除命名空间分支 - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - String operator = "operator_example"; // String | - try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **operator** | **String**| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO) - -创建灰度删除发布 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = new NamespaceGrayDelReleaseDTO(); // NamespaceGrayDelReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **namespaceGrayDelReleaseDTO** | [**NamespaceGrayDelReleaseDTO**](NamespaceGrayDelReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet** -> OpenGrayReleaseRuleDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName) - -获取分支灰度发布规则 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - try { - OpenGrayReleaseRuleDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | - -### Return type - -[**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut** -> Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO) - -更新分支灰度发布规则 - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - String operator = "operator_example"; // String | - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = new OpenGrayReleaseRuleDTO(); // OpenGrayReleaseRuleDTO | - try { - Object result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **operator** | **String**| | | -| **openGrayReleaseRuleDTO** | [**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md)| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet** -> List<OpenItemDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName) - -获取分支下的配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | - -### Return type - -[**List<OpenItemDTO>**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取分支下的配置项列表 | - | -| **404** | 分支不存在 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO) - -合并分支 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - Boolean deleteBranch = true; // Boolean | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **deleteBranch** | **Boolean**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 分支合并成功 | - | -| **400** | 合并参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO) - -合并分支到主分支 - -PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - Boolean deleteBranch = true; // Boolean | - String xApolloOperator = "xApolloOperator_example"; // String | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **deleteBranch** | **Boolean**| | | -| **xApolloOperator** | **String**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO) - -创建灰度发布 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String branchName = "branchName_example"; // String | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - diff --git a/java-client/docs/NamespaceGrayDelReleaseDTO.md b/java-client/docs/NamespaceGrayDelReleaseDTO.md deleted file mode 100644 index ed9eaa1..0000000 --- a/java-client/docs/NamespaceGrayDelReleaseDTO.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# NamespaceGrayDelReleaseDTO - -命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**releaseTitle** | **String** | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] | -|**releaseComment** | **String** | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] | -|**releasedBy** | **String** | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] | -|**isEmergencyPublish** | **Boolean** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] | -|**grayDelKeys** | **List<String>** | 需要在灰度发布中删除的配置项键名列表 | [optional] | - - - diff --git a/java-client/docs/NamespaceIdentifier.md b/java-client/docs/NamespaceIdentifier.md deleted file mode 100644 index dc61b50..0000000 --- a/java-client/docs/NamespaceIdentifier.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# NamespaceIdentifier - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**env** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | - - - diff --git a/java-client/docs/NamespaceManagementApi.md b/java-client/docs/NamespaceManagementApi.md deleted file mode 100644 index b4ac0cd..0000000 --- a/java-client/docs/NamespaceManagementApi.md +++ /dev/null @@ -1,672 +0,0 @@ -# NamespaceManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1AppnamespacesGet**](NamespaceManagementApi.md#openapiV1AppnamespacesGet) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace | -| [**openapiV1AppsAppIdAppnamespacesGet**](NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace | -| [**openapiV1AppsAppIdAppnamespacesNamespaceNameGet**](NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesNamespaceNameGet) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace | -| [**openapiV1AppsAppIdAppnamespacesPost**](NamespaceManagementApi.md#openapiV1AppsAppIdAppnamespacesPost) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace | -| [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet**](NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace | -| [**openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet**](NamespaceManagementApi.md#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace | -| [**openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet**](NamespaceManagementApi.md#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet**](NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet**](NamespaceManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 | - - - -# **openapiV1AppnamespacesGet** -> List<OpenAppNamespaceDTO> openapiV1AppnamespacesGet(publicOnly) - -获取所有公共AppNamespace - -GET /openapi/v1/appnamespaces?public=true - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - Boolean publicOnly = false; // Boolean | - try { - List result = apiInstance.openapiV1AppnamespacesGet(publicOnly); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppnamespacesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **publicOnly** | **Boolean**| | | - -### Return type - -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdAppnamespacesGet** -> List<OpenAppNamespaceDTO> openapiV1AppsAppIdAppnamespacesGet(appId) - -获取指定应用的AppNamespace - -GET /openapi/v1/apps/{appId}/appnamespaces - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - List result = apiInstance.openapiV1AppsAppIdAppnamespacesGet(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdAppnamespacesNamespaceNameGet** -> OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName) - -获取指定的AppNamespace - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenAppNamespaceDTO result = apiInstance.openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdAppnamespacesPost** -> OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO) - -创建AppNamespace - -POST /openapi/v1/apps/{appId}/appnamespaces - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenAppNamespaceDTO openAppNamespaceDTO = new OpenAppNamespaceDTO(); // OpenAppNamespaceDTO | - try { - OpenAppNamespaceDTO result = apiInstance.openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openAppNamespaceDTO** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | AppNamespace创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet** -> List<String> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName) - -检查缺失的Namespace - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - List result = apiInstance.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -**List<String>** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet** -> OpenNamespaceDTO openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName) - -获取关联的公共Namespace - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenNamespaceDTO result = apiInstance.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet** -> List<OpenNamespaceDTO> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size) - -获取公共AppNamespace的所有实例 - -GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String env = "env_example"; // String | - String publicNamespaceName = "publicNamespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **publicNamespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | - -### Return type - -[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet** -> List<OpenNamespaceDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail) - -获取指定集群下的所有Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - Boolean fillItemDetail = true; // Boolean | - try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **fillItemDetail** | **Boolean**| | | - -### Return type - -[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet** -> OpenNamespaceLockDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName) - -获取Namespace的锁状态 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenNamespaceLockDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - diff --git a/java-client/docs/NamespaceReleaseDTO.md b/java-client/docs/NamespaceReleaseDTO.md deleted file mode 100644 index 2c7af0c..0000000 --- a/java-client/docs/NamespaceReleaseDTO.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# NamespaceReleaseDTO - -命名空间发布请求数据传输对象,用于创建新的配置发布 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**releaseTitle** | **String** | 发布标题,用于标识这次发布的名称或版本号 | [optional] | -|**releaseComment** | **String** | 发布备注,详细描述本次发布的变更内容和目的 | [optional] | -|**releasedBy** | **String** | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] | -|**isEmergencyPublish** | **Boolean** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] | - - - diff --git a/java-client/docs/NamespaceSyncModel.md b/java-client/docs/NamespaceSyncModel.md deleted file mode 100644 index ec78fba..0000000 --- a/java-client/docs/NamespaceSyncModel.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# NamespaceSyncModel - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**syncToNamespaces** | [**List<NamespaceIdentifier>**](NamespaceIdentifier.md) | | [optional] | -|**syncItems** | [**List<ItemDTO>**](ItemDTO.md) | | [optional] | - - - diff --git a/java-client/docs/NamespaceTextModel.md b/java-client/docs/NamespaceTextModel.md deleted file mode 100644 index 40395b5..0000000 --- a/java-client/docs/NamespaceTextModel.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# NamespaceTextModel - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**env** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | -|**namespaceId** | **Long** | | [optional] | -|**format** | **String** | | [optional] | -|**configText** | **String** | | [optional] | -|**operator** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenAppDTO.md b/java-client/docs/OpenAppDTO.md deleted file mode 100644 index b60a5d5..0000000 --- a/java-client/docs/OpenAppDTO.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# OpenAppDTO - -Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 数据创建者用户名,记录是谁创建了这个应用 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 数据创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 数据最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**name** | **String** | 应用名称,用于显示的友好名称 | [optional] | -|**appId** | **String** | 应用唯一标识符,全局唯一的应用ID | [optional] | -|**orgId** | **String** | 组织ID,应用所属组织的唯一标识 | [optional] | -|**orgName** | **String** | 组织名称,应用所属组织的显示名称 | [optional] | -|**ownerName** | **String** | 应用负责人姓名,应用的主要负责人 | [optional] | -|**ownerEmail** | **String** | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] | - - - diff --git a/java-client/docs/OpenAppNamespaceDTO.md b/java-client/docs/OpenAppNamespaceDTO.md deleted file mode 100644 index c1e5101..0000000 --- a/java-client/docs/OpenAppNamespaceDTO.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# OpenAppNamespaceDTO - -Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**name** | **String** | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**format** | **String** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] | -|**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | -|**appendNamespacePrefix** | **Boolean** | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional] | -|**comment** | **String** | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] | - - - diff --git a/java-client/docs/OpenClusterDTO.md b/java-client/docs/OpenClusterDTO.md deleted file mode 100644 index 54fc4a8..0000000 --- a/java-client/docs/OpenClusterDTO.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# OpenClusterDTO - -Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 集群创建者用户名,记录是谁创建了这个集群 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 集群创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**name** | **String** | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | - - - diff --git a/java-client/docs/OpenCreateAppDTO.md b/java-client/docs/OpenCreateAppDTO.md deleted file mode 100644 index b51f186..0000000 --- a/java-client/docs/OpenCreateAppDTO.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenCreateAppDTO - -创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**assignAppRoleToSelf** | **Boolean** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] | -|**admins** | **List<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] | -|**app** | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] | - - - diff --git a/java-client/docs/OpenEnvClusterDTO.md b/java-client/docs/OpenEnvClusterDTO.md deleted file mode 100644 index a7251c7..0000000 --- a/java-client/docs/OpenEnvClusterDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenEnvClusterDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**env** | **String** | | [optional] | -|**clusters** | **List<String>** | | [optional] | - - - diff --git a/java-client/docs/OpenGrayReleaseRuleDTO.md b/java-client/docs/OpenGrayReleaseRuleDTO.md deleted file mode 100644 index 8a30133..0000000 --- a/java-client/docs/OpenGrayReleaseRuleDTO.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# OpenGrayReleaseRuleDTO - -Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 灰度规则创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 灰度规则最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**namespaceName** | **String** | 所属命名空间的名称 | [optional] | -|**branchName** | **String** | 灰度分支名称,标识灰度发布的分支 | [optional] | -|**ruleItems** | [**List<OpenGrayReleaseRuleItemDTO>**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] | - - - diff --git a/java-client/docs/OpenGrayReleaseRuleItemDTO.md b/java-client/docs/OpenGrayReleaseRuleItemDTO.md deleted file mode 100644 index a53ef87..0000000 --- a/java-client/docs/OpenGrayReleaseRuleItemDTO.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenGrayReleaseRuleItemDTO - -Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientAppId** | **String** | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] | -|**clientIpList** | **List<String>** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] | -|**clientLabelList** | **List<String>** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] | - - - diff --git a/java-client/docs/OpenInstanceConfigDTO.md b/java-client/docs/OpenInstanceConfigDTO.md deleted file mode 100644 index 17d61a9..0000000 --- a/java-client/docs/OpenInstanceConfigDTO.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OpenInstanceConfigDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**release** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] | -|**releaseDeliveryTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenInstanceDTO.md b/java-client/docs/OpenInstanceDTO.md deleted file mode 100644 index 5d174be..0000000 --- a/java-client/docs/OpenInstanceDTO.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# OpenInstanceDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**appId** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**dataCenter** | **String** | | [optional] | -|**ip** | **String** | | [optional] | -|**configs** | [**List<OpenInstanceConfigDTO>**](OpenInstanceConfigDTO.md) | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenItemDTO.md b/java-client/docs/OpenItemDTO.md deleted file mode 100644 index bcfea65..0000000 --- a/java-client/docs/OpenItemDTO.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# OpenItemDTO - -Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 配置项创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**key** | **String** | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] | -|**type** | **Integer** | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] | -|**value** | **String** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] | -|**comment** | **String** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] | - - - diff --git a/java-client/docs/OpenNamespaceDTO.md b/java-client/docs/OpenNamespaceDTO.md deleted file mode 100644 index f8da948..0000000 --- a/java-client/docs/OpenNamespaceDTO.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# OpenNamespaceDTO - -Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**namespaceName** | **String** | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] | -|**comment** | **String** | 命名空间备注说明,描述命名空间的用途 | [optional] | -|**format** | **String** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] | -|**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | -|**items** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 命名空间包含的配置项列表 | [optional] | - - - diff --git a/java-client/docs/OpenNamespaceLockDTO.md b/java-client/docs/OpenNamespaceLockDTO.md deleted file mode 100644 index b369a19..0000000 --- a/java-client/docs/OpenNamespaceLockDTO.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenNamespaceLockDTO - -Apollo命名空间锁状态数据传输对象 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespaceName** | **String** | 命名空间名称 | [optional] | -|**isLocked** | **Boolean** | 是否被锁定 | [optional] | -|**lockedBy** | **String** | 锁定者用户名 | [optional] | - - - diff --git a/java-client/docs/OpenOrganizationDto.md b/java-client/docs/OpenOrganizationDto.md deleted file mode 100644 index dd546a3..0000000 --- a/java-client/docs/OpenOrganizationDto.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenOrganizationDto - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**orgId** | **String** | | [optional] | -|**orgName** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenPageDTOOpenInstanceDTO.md b/java-client/docs/OpenPageDTOOpenInstanceDTO.md deleted file mode 100644 index 4adee06..0000000 --- a/java-client/docs/OpenPageDTOOpenInstanceDTO.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# OpenPageDTOOpenInstanceDTO - -分页实例数据传输对象,用于返回分页查询的实例列表结果 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**page** | **Integer** | 当前页码,从0开始计数 | [optional] | -|**size** | **Integer** | 每页显示的记录数量 | [optional] | -|**total** | **Long** | 总记录数,符合查询条件的实例总数量 | [optional] | -|**content** | [**List<OpenInstanceDTO>**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] | - - - diff --git a/java-client/docs/OpenPageDTOOpenItemDTO.md b/java-client/docs/OpenPageDTOOpenItemDTO.md deleted file mode 100644 index 036ac0d..0000000 --- a/java-client/docs/OpenPageDTOOpenItemDTO.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# OpenPageDTOOpenItemDTO - -分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**page** | **Integer** | 当前页码,从0开始计数 | [optional] | -|**size** | **Integer** | 每页显示的记录数量 | [optional] | -|**total** | **Long** | 总记录数,符合查询条件的配置项总数量 | [optional] | -|**content** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 当前页的配置项列表,包含具体的配置项数据 | [optional] | - - - diff --git a/java-client/docs/OpenReleaseDTO.md b/java-client/docs/OpenReleaseDTO.md deleted file mode 100644 index 14753a3..0000000 --- a/java-client/docs/OpenReleaseDTO.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# OpenReleaseDTO - -Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 发布创建者用户名,记录是谁创建了这次发布 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] | -|**dataChangeCreatedTime** | **String** | 发布创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 发布最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**id** | **Long** | 发布记录的唯一标识符,系统自动生成 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**namespaceName** | **String** | 所属命名空间的名称 | [optional] | -|**name** | **String** | 发布名称,用于标识这次发布的版本或描述 | [optional] | -|**configurations** | [**MapString**](MapString.md) | | [optional] | -|**comment** | **String** | 发布备注,描述本次发布的变更内容和目的 | [optional] | - - - diff --git a/java-client/docs/OpenapiV1AppsGet401Response.md b/java-client/docs/OpenapiV1AppsGet401Response.md deleted file mode 100644 index 3965851..0000000 --- a/java-client/docs/OpenapiV1AppsGet401Response.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenapiV1AppsGet401Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1AppsPost400Response.md b/java-client/docs/OpenapiV1AppsPost400Response.md deleted file mode 100644 index 966162b..0000000 --- a/java-client/docs/OpenapiV1AppsPost400Response.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenapiV1AppsPost400Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**message** | **String** | | [optional] | -|**exception** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1AppsPostRequest.md b/java-client/docs/OpenapiV1AppsPostRequest.md deleted file mode 100644 index 46f4ba4..0000000 --- a/java-client/docs/OpenapiV1AppsPostRequest.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenapiV1AppsPostRequest - - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**app** | [**OpenAppDTO**](OpenAppDTO.md) | | | -|**assignAppRoleToSelf** | **Boolean** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | | -|**admins** | **List<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | | - - - diff --git a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md b/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md deleted file mode 100644 index 02b3fdf..0000000 --- a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**valid** | **Boolean** | | [optional] | -|**message** | **String** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md b/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md deleted file mode 100644 index 7744d10..0000000 --- a/java-client/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**valid** | **Boolean** | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | **List<String>** | | [optional] | - - - diff --git a/java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md b/java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md deleted file mode 100644 index 48c021c..0000000 --- a/java-client/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenapiV1EnvsEnvReleasesCompareGet200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**changes** | [**List<Change>**](Change.md) | | [optional] | - - - diff --git a/java-client/docs/OrganizationManagementApi.md b/java-client/docs/OrganizationManagementApi.md deleted file mode 100644 index bfac5d9..0000000 --- a/java-client/docs/OrganizationManagementApi.md +++ /dev/null @@ -1,75 +0,0 @@ -# OrganizationManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1OrganizationsGet**](OrganizationManagementApi.md#openapiV1OrganizationsGet) | **GET** /openapi/v1/organizations | 获取所有组织信息 | - - - -# **openapiV1OrganizationsGet** -> List<OpenOrganizationDto> openapiV1OrganizationsGet() - -获取所有组织信息 - -GET /openapi/v1/organizations - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.OrganizationManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - OrganizationManagementApi apiInstance = new OrganizationManagementApi(defaultClient); - try { - List result = apiInstance.openapiV1OrganizationsGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling OrganizationManagementApi#openapiV1OrganizationsGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<OpenOrganizationDto>**](OpenOrganizationDto.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取组织列表 | - | -| **401** | 未授权访问 | - | - diff --git a/java-client/docs/ReleaseDTO.md b/java-client/docs/ReleaseDTO.md deleted file mode 100644 index f9e157d..0000000 --- a/java-client/docs/ReleaseDTO.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# ReleaseDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | | [optional] | -|**dataChangeLastModifiedBy** | **String** | | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | | [optional] | -|**dataChangeCreatedTime** | **String** | | [optional] | -|**dataChangeLastModifiedTime** | **String** | | [optional] | -|**id** | **Long** | | [optional] | -|**releaseKey** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**appId** | **String** | | [optional] | -|**clusterName** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | -|**configurations** | **String** | | [optional] | -|**comment** | **String** | | [optional] | -|**isAbandoned** | **Boolean** | | [optional] | - - - diff --git a/java-client/docs/ReleaseManagementApi.md b/java-client/docs/ReleaseManagementApi.md deleted file mode 100644 index 4bacc90..0000000 --- a/java-client/docs/ReleaseManagementApi.md +++ /dev/null @@ -1,545 +0,0 @@ -# ReleaseManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 | -| [**openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost**](ReleaseManagementApi.md#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 | -| [**openapiV1EnvsEnvReleasesCompareGet**](ReleaseManagementApi.md#openapiV1EnvsEnvReleasesCompareGet) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 | -| [**openapiV1EnvsEnvReleasesReleaseIdGet**](ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdGet) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 | -| [**openapiV1EnvsEnvReleasesReleaseIdRollbackPut**](ReleaseManagementApi.md#openapiV1EnvsEnvReleasesReleaseIdRollbackPut) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 | - - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet** -> List<OpenReleaseDTO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size) - -获取活跃发布(分页) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 5; // Integer | - try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | - -### Return type - -[**List<OpenReleaseDTO>**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet** -> List<ListReleaseBO> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size) - -获取所有发布(分页) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Integer page = 0; // Integer | - Integer size = 5; // Integer | - try { - List result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | - -### Return type - -[**List<ListReleaseBO>**](ListReleaseBO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName) - -获取最新活跃发布 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取最新活跃发布 | - | -| **404** | 未找到活跃发布 | - | - - -# **openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost** -> OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO) - -创建发布 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 发布创建成功 | - | -| **400** | 发布参数错误 | - | -| **403** | 权限不足 | - | - - -# **openapiV1EnvsEnvReleasesCompareGet** -> OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId) - -对比发布 - -GET /openapi/v1/envs/{env}/releases/compare - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | - Integer baseReleaseId = 56; // Integer | - Integer toCompareReleaseId = 56; // Integer | - try { - OpenapiV1EnvsEnvReleasesCompareGet200Response result = apiInstance.openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvReleasesCompareGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **baseReleaseId** | **Integer**| | | -| **toCompareReleaseId** | **Integer**| | | - -### Return type - -[**OpenapiV1EnvsEnvReleasesCompareGet200Response**](OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvReleasesReleaseIdGet** -> OpenReleaseDTO openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId) - -获取发布详情 - -GET /openapi/v1/envs/{env}/releases/{releaseId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | - Integer releaseId = 56; // Integer | - try { - OpenReleaseDTO result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **releaseId** | **Integer**| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **openapiV1EnvsEnvReleasesReleaseIdRollbackPut** -> Object openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator) - -回滚发布 - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | - Integer releaseId = 56; // Integer | - String operator = "operator_example"; // String | - try { - Object result = apiInstance.openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdRollbackPut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **releaseId** | **Integer**| | | -| **operator** | **String**| | | - -### Return type - -**Object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - diff --git a/java-client/git_push.sh b/java-client/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/java-client/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/java-client/gradle.properties b/java-client/gradle.properties deleted file mode 100644 index a340857..0000000 --- a/java-client/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). -# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. -# -# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties -# For example, uncomment below to build for Android -#target = android diff --git a/java-client/gradle/wrapper/gradle-wrapper.jar b/java-client/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index e644113..0000000 Binary files a/java-client/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/java-client/gradle/wrapper/gradle-wrapper.properties b/java-client/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index b82aa23..0000000 --- a/java-client/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,7 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip -networkTimeout=10000 -validateDistributionUrl=true -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/java-client/gradlew b/java-client/gradlew deleted file mode 100644 index 9d0ce63..0000000 --- a/java-client/gradlew +++ /dev/null @@ -1,249 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while -APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path -[ -h "$app_path" ] -do -ls=$( ls -ld "$app_path" ) -link=${ls#*' -> '} -case $link in #( -/*) app_path=$link ;; #( -*) app_path=$APP_HOME$link ;; -esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { -echo "$*" -} >&2 - -die () { -echo -echo "$*" -echo -exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( -CYGWIN* ) cygwin=true ;; #( -Darwin* ) darwin=true ;; #( -MSYS* | MINGW* ) msys=true ;; #( -NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then -if [ -x "$JAVA_HOME/jre/sh/java" ] ; then -# IBM's JDK on AIX uses strange locations for the executables -JAVACMD=$JAVA_HOME/jre/sh/java -else -JAVACMD=$JAVA_HOME/bin/java -fi -if [ ! -x "$JAVACMD" ] ; then -die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi -else -JAVACMD=java -if ! command -v java >/dev/null 2>&1 -then -die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then -case $MAX_FD in #( -max*) -# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. -# shellcheck disable=SC2039,SC3045 -MAX_FD=$( ulimit -H -n ) || -warn "Could not query maximum file descriptor limit" -esac -case $MAX_FD in #( -'' | soft) :;; #( -*) -# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. -# shellcheck disable=SC2039,SC3045 -ulimit -n "$MAX_FD" || -warn "Could not set maximum file descriptor limit to $MAX_FD" -esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then -APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) -CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - -JAVACMD=$( cygpath --unix "$JAVACMD" ) - -# Now convert the arguments - kludge to limit ourselves to /bin/sh -for arg do -if -case $arg in #( --*) false ;; # don't mess with options #( -/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath -[ -e "$t" ] ;; #( -*) false ;; -esac -then -arg=$( cygpath --path --ignore --mixed "$arg" ) -fi -# Roll the args list around exactly as many times as the number of -# args, so each arg winds up back in the position where it started, but -# possibly modified. -# -# NB: a `for` loop captures its iteration list before it begins, so -# changing the positional parameters here affects neither the number of -# iterations, nor the values presented in `arg`. -shift # remove old arg -set -- "$@" "$arg" # push replacement arg -done -fi - - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, -# and any embedded shellness will be escaped. -# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be -# treated as '${Hostname}' itself on the command line. - -set -- \ -"-Dorg.gradle.appname=$APP_BASE_NAME" \ --classpath "$CLASSPATH" \ -org.gradle.wrapper.GradleWrapperMain \ -"$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then -die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( -printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | -xargs -n1 | -sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | -tr '\n' ' ' -)" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/java-client/gradlew.bat b/java-client/gradlew.bat deleted file mode 100644 index 25da30d..0000000 --- a/java-client/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. 1>&2 -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 -echo. 1>&2 -echo Please set the JAVA_HOME variable in your environment to match the 1>&2 -echo location of your Java installation. 1>&2 - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/java-client/pom.xml b/java-client/pom.xml deleted file mode 100644 index daff9e3..0000000 --- a/java-client/pom.xml +++ /dev/null @@ -1,340 +0,0 @@ - - 4.0.0 - com.apollo - apollo-openapi-client - jar - apollo-openapi-client - 0.0.1 - https://github.com/openapitools/openapi-generator - OpenAPI Java - - scm:git:git@github.com:openapitools/openapi-generator.git - scm:git:git@github.com:openapitools/openapi-generator.git - https://github.com/openapitools/openapi-generator - - - - - Unlicense - http://unlicense.org - repo - - - - - - OpenAPI-Generator Contributors - team@openapitools.org - OpenAPITools.org - http://openapitools.org - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.4.1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - - - - maven-dependency-plugin - 3.6.1 - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.3.0 - - - - test-jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.5.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.6.3 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.3.0 - - - attach-sources - - jar-no-fork - - - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - - - - - .gitignore - - - - - - true - 4 - - - - - - - - - - 1.8 - - true - - - - - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.2.1 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-version} - provided - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - jakarta.ws.rs - jakarta.ws.rs-api - ${jakarta.ws.rs-api-version} - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - test - - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - - - - 1.8 - ${java.version} - ${java.version} - 1.9.0 - 4.12.0 - 2.10.1 - 3.18.0 - 0.2.6 - 1.3.5 - 2.0.2 - 5.10.3 - 1.10.0 - 2.1.6 - 1.1.1 - UTF-8 - 2.43.0 - - diff --git a/java-client/settings.gradle b/java-client/settings.gradle deleted file mode 100644 index 22c8942..0000000 --- a/java-client/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "apollo-openapi-client" \ No newline at end of file diff --git a/java-client/src/main/AndroidManifest.xml b/java-client/src/main/AndroidManifest.xml deleted file mode 100644 index 54fbcb3..0000000 --- a/java-client/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/java-client/src/main/java/org/openapitools/client/ApiCallback.java b/java-client/src/main/java/org/openapitools/client/ApiCallback.java deleted file mode 100644 index 0dbf42f..0000000 --- a/java-client/src/main/java/org/openapitools/client/ApiCallback.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.io.IOException; - -import java.util.Map; -import java.util.List; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API download processing. - * - * @param bytesRead bytes Read - * @param contentLength content length of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/java-client/src/main/java/org/openapitools/client/ApiClient.java b/java-client/src/main/java/org/openapitools/client/ApiClient.java deleted file mode 100644 index 7898094..0000000 --- a/java-client/src/main/java/org/openapitools/client/ApiClient.java +++ /dev/null @@ -1,1588 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; - -import javax.net.ssl.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Type; -import java.net.URI; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.function.Supplier; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.openapitools.client.auth.Authentication; -import org.openapitools.client.auth.HttpBasicAuth; -import org.openapitools.client.auth.HttpBearerAuth; -import org.openapitools.client.auth.ApiKeyAuth; - -/** - *

ApiClient class.

- */ -public class ApiClient { - - protected String basePath = "http://localhost"; - protected List servers = new ArrayList(Arrays.asList( - new ServerConfiguration( - "", - "No description provided", - new HashMap() - ) - )); - protected Integer serverIndex = 0; - protected Map serverVariables = null; - protected boolean debugging = false; - protected Map defaultHeaderMap = new HashMap(); - protected Map defaultCookieMap = new HashMap(); - protected String tempFolderPath = null; - - protected Map authentications; - - protected DateFormat dateFormat; - protected DateFormat datetimeFormat; - protected boolean lenientDatetimeFormat; - protected int dateLength; - - protected InputStream sslCaCert; - protected boolean verifyingSsl; - protected KeyManager[] keyManagers; - - protected OkHttpClient httpClient; - protected JSON json; - - protected HttpLoggingInterceptor loggingInterceptor; - - /** - * Basic constructor for ApiClient - */ - public ApiClient() { - init(); - initHttpClient(); - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "Authorization")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - /** - * Basic constructor with custom OkHttpClient - * - * @param client a {@link okhttp3.OkHttpClient} object - */ - public ApiClient(OkHttpClient client) { - init(); - - httpClient = client; - - // Setup authentications (key: authentication name, value: authentication). - authentications.put("ApiKeyAuth", new ApiKeyAuth("header", "Authorization")); - // Prevent the authentications from being modified. - authentications = Collections.unmodifiableMap(authentications); - } - - protected void initHttpClient() { - initHttpClient(Collections.emptyList()); - } - - protected void initHttpClient(List interceptors) { - OkHttpClient.Builder builder = new OkHttpClient.Builder(); - builder.addNetworkInterceptor(getProgressInterceptor()); - for (Interceptor interceptor: interceptors) { - builder.addInterceptor(interceptor); - } - - httpClient = builder.build(); - } - - protected void init() { - verifyingSsl = true; - - json = new JSON(); - - // Set default User-Agent. - setUserAgent("OpenAPI-Generator/0.0.1/java"); - - authentications = new HashMap(); - } - - /** - * Get base path - * - * @return Base path - */ - public String getBasePath() { - return basePath; - } - - /** - * Set base path - * - * @param basePath Base path of the URL (e.g http://localhost - * @return An instance of OkHttpClient - */ - public ApiClient setBasePath(String basePath) { - this.basePath = basePath; - this.serverIndex = null; - return this; - } - - public List getServers() { - return servers; - } - - public ApiClient setServers(List servers) { - this.servers = servers; - return this; - } - - public Integer getServerIndex() { - return serverIndex; - } - - public ApiClient setServerIndex(Integer serverIndex) { - this.serverIndex = serverIndex; - return this; - } - - public Map getServerVariables() { - return serverVariables; - } - - public ApiClient setServerVariables(Map serverVariables) { - this.serverVariables = serverVariables; - return this; - } - - /** - * Get HTTP client - * - * @return An instance of OkHttpClient - */ - public OkHttpClient getHttpClient() { - return httpClient; - } - - /** - * Set HTTP client, which must never be null. - * - * @param newHttpClient An instance of OkHttpClient - * @return Api Client - * @throws java.lang.NullPointerException when newHttpClient is null - */ - public ApiClient setHttpClient(OkHttpClient newHttpClient) { - this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); - return this; - } - - /** - * Get JSON - * - * @return JSON object - */ - public JSON getJSON() { - return json; - } - - /** - * Set JSON - * - * @param json JSON object - * @return Api client - */ - public ApiClient setJSON(JSON json) { - this.json = json; - return this; - } - - /** - * True if isVerifyingSsl flag is on - * - * @return True if isVerifySsl flag is on - */ - public boolean isVerifyingSsl() { - return verifyingSsl; - } - - /** - * Configure whether to verify certificate and hostname when making https requests. - * Default to true. - * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. - * - * @param verifyingSsl True to verify TLS/SSL connection - * @return ApiClient - */ - public ApiClient setVerifyingSsl(boolean verifyingSsl) { - this.verifyingSsl = verifyingSsl; - applySslSettings(); - return this; - } - - /** - * Get SSL CA cert. - * - * @return Input stream to the SSL CA cert - */ - public InputStream getSslCaCert() { - return sslCaCert; - } - - /** - * Configure the CA certificate to be trusted when making https requests. - * Use null to reset to default. - * - * @param sslCaCert input stream for SSL CA cert - * @return ApiClient - */ - public ApiClient setSslCaCert(InputStream sslCaCert) { - this.sslCaCert = sslCaCert; - applySslSettings(); - return this; - } - - /** - *

Getter for the field keyManagers.

- * - * @return an array of {@link javax.net.ssl.KeyManager} objects - */ - public KeyManager[] getKeyManagers() { - return keyManagers; - } - - /** - * Configure client keys to use for authorization in an SSL session. - * Use null to reset to default. - * - * @param managers The KeyManagers to use - * @return ApiClient - */ - public ApiClient setKeyManagers(KeyManager[] managers) { - this.keyManagers = managers; - applySslSettings(); - return this; - } - - /** - *

Getter for the field dateFormat.

- * - * @return a {@link java.text.DateFormat} object - */ - public DateFormat getDateFormat() { - return dateFormat; - } - - /** - *

Setter for the field dateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setDateFormat(DateFormat dateFormat) { - JSON.setDateFormat(dateFormat); - return this; - } - - /** - *

Set SqlDateFormat.

- * - * @param dateFormat a {@link java.text.DateFormat} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setSqlDateFormat(DateFormat dateFormat) { - JSON.setSqlDateFormat(dateFormat); - return this; - } - - /** - *

Set OffsetDateTimeFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - JSON.setOffsetDateTimeFormat(dateFormat); - return this; - } - - /** - *

Set LocalDateFormat.

- * - * @param dateFormat a {@link java.time.format.DateTimeFormatter} object - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { - JSON.setLocalDateFormat(dateFormat); - return this; - } - - /** - *

Set LenientOnJson.

- * - * @param lenientOnJson a boolean - * @return a {@link org.openapitools.client.ApiClient} object - */ - public ApiClient setLenientOnJson(boolean lenientOnJson) { - JSON.setLenientOnJson(lenientOnJson); - return this; - } - - /** - * Get authentications (key: authentication name, value: authentication). - * - * @return Map of authentication objects - */ - public Map getAuthentications() { - return authentications; - } - - /** - * Get authentication for the given name. - * - * @param authName The authentication name - * @return The authentication, null if not found - */ - public Authentication getAuthentication(String authName) { - return authentications.get(authName); - } - - - /** - * Helper method to set username for the first HTTP basic authentication. - * - * @param username Username - */ - public void setUsername(String username) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setUsername(username); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set password for the first HTTP basic authentication. - * - * @param password Password - */ - public void setPassword(String password) { - for (Authentication auth : authentications.values()) { - if (auth instanceof HttpBasicAuth) { - ((HttpBasicAuth) auth).setPassword(password); - return; - } - } - throw new RuntimeException("No HTTP basic authentication configured!"); - } - - /** - * Helper method to set API key value for the first API key authentication. - * - * @param apiKey API key - */ - public void setApiKey(String apiKey) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKey(apiKey); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set API key prefix for the first API key authentication. - * - * @param apiKeyPrefix API key prefix - */ - public void setApiKeyPrefix(String apiKeyPrefix) { - for (Authentication auth : authentications.values()) { - if (auth instanceof ApiKeyAuth) { - ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); - return; - } - } - throw new RuntimeException("No API key authentication configured!"); - } - - /** - * Helper method to set access token for the first OAuth2 authentication. - * - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - throw new RuntimeException("No OAuth2 authentication configured!"); - } - - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - - /** - * Helper method to set credentials for AWSV4 Signature - * - * @param accessKey Access Key - * @param secretKey Secret Key - * @param sessionToken Session Token - * @param region Region - * @param service Service to access to - */ - public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { - throw new RuntimeException("No AWS4 authentication configured!"); - } - - /** - * Set the User-Agent header's value (by adding to the default header map). - * - * @param userAgent HTTP request's user agent - * @return ApiClient - */ - public ApiClient setUserAgent(String userAgent) { - addDefaultHeader("User-Agent", userAgent); - return this; - } - - /** - * Add a default header. - * - * @param key The header's key - * @param value The header's value - * @return ApiClient - */ - public ApiClient addDefaultHeader(String key, String value) { - defaultHeaderMap.put(key, value); - return this; - } - - /** - * Add a default cookie. - * - * @param key The cookie's key - * @param value The cookie's value - * @return ApiClient - */ - public ApiClient addDefaultCookie(String key, String value) { - defaultCookieMap.put(key, value); - return this; - } - - /** - * Check that whether debugging is enabled for this API client. - * - * @return True if debugging is enabled, false otherwise. - */ - public boolean isDebugging() { - return debugging; - } - - /** - * Enable/disable debugging for this API client. - * - * @param debugging To enable (true) or disable (false) debugging - * @return ApiClient - */ - public ApiClient setDebugging(boolean debugging) { - if (debugging != this.debugging) { - if (debugging) { - loggingInterceptor = new HttpLoggingInterceptor(); - loggingInterceptor.setLevel(Level.BODY); - httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); - } else { - final OkHttpClient.Builder builder = httpClient.newBuilder(); - builder.interceptors().remove(loggingInterceptor); - httpClient = builder.build(); - loggingInterceptor = null; - } - } - this.debugging = debugging; - return this; - } - - /** - * The path of temporary folder used to store downloaded files from endpoints - * with file response. The default value is null, i.e. using - * the system's default temporary folder. - * - * @see createTempFile - * @return Temporary folder path - */ - public String getTempFolderPath() { - return tempFolderPath; - } - - /** - * Set the temporary folder path (for downloading files) - * - * @param tempFolderPath Temporary folder path - * @return ApiClient - */ - public ApiClient setTempFolderPath(String tempFolderPath) { - this.tempFolderPath = tempFolderPath; - return this; - } - - /** - * Get connection timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getConnectTimeout() { - return httpClient.connectTimeoutMillis(); - } - - /** - * Sets the connect timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param connectionTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setConnectTimeout(int connectionTimeout) { - httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get read timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getReadTimeout() { - return httpClient.readTimeoutMillis(); - } - - /** - * Sets the read timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param readTimeout read timeout in milliseconds - * @return Api client - */ - public ApiClient setReadTimeout(int readTimeout) { - httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - /** - * Get write timeout (in milliseconds). - * - * @return Timeout in milliseconds - */ - public int getWriteTimeout() { - return httpClient.writeTimeoutMillis(); - } - - /** - * Sets the write timeout (in milliseconds). - * A value of 0 means no timeout, otherwise values must be between 1 and - * {@link java.lang.Integer#MAX_VALUE}. - * - * @param writeTimeout connection timeout in milliseconds - * @return Api client - */ - public ApiClient setWriteTimeout(int writeTimeout) { - httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); - return this; - } - - - /** - * Format the given parameter object into string. - * - * @param param Parameter - * @return String representation of the parameter - */ - public String parameterToString(Object param) { - if (param == null) { - return ""; - } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { - //Serialize to json string and remove the " enclosing characters - String jsonStr = JSON.serialize(param); - return jsonStr.substring(1, jsonStr.length() - 1); - } else if (param instanceof Collection) { - StringBuilder b = new StringBuilder(); - for (Object o : (Collection) param) { - if (b.length() > 0) { - b.append(","); - } - b.append(o); - } - return b.toString(); - } else { - return String.valueOf(param); - } - } - - /** - * Formats the specified query parameter to a list containing a single {@code Pair} object. - * - * Note that {@code value} must not be a collection. - * - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list containing a single {@code Pair} object. - */ - public List parameterToPair(String name, Object value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) { - return params; - } - - params.add(new Pair(name, parameterToString(value))); - return params; - } - - /** - * Formats the specified collection query parameters to a list of {@code Pair} objects. - * - * Note that the values of each of the returned Pair objects are percent-encoded. - * - * @param collectionFormat The collection format of the parameter. - * @param name The name of the parameter. - * @param value The value of the parameter. - * @return A list of {@code Pair} objects. - */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { - List params = new ArrayList(); - - // preconditions - if (name == null || name.isEmpty() || value == null || value.isEmpty()) { - return params; - } - - // create the params based on the collection format - if ("multi".equals(collectionFormat)) { - for (Object item : value) { - params.add(new Pair(name, escapeString(parameterToString(item)))); - } - return params; - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - // escape all delimiters except commas, which are URI reserved - // characters - if ("ssv".equals(collectionFormat)) { - delimiter = escapeString(" "); - } else if ("tsv".equals(collectionFormat)) { - delimiter = escapeString("\t"); - } else if ("pipes".equals(collectionFormat)) { - delimiter = escapeString("|"); - } - - StringBuilder sb = new StringBuilder(); - for (Object item : value) { - sb.append(delimiter); - sb.append(escapeString(parameterToString(item))); - } - - params.add(new Pair(name, sb.substring(delimiter.length()))); - - return params; - } - - /** - * Formats the specified free-form query parameters to a list of {@code Pair} objects. - * - * @param value The free-form query parameters. - * @return A list of {@code Pair} objects. - */ - public List freeFormParameterToPairs(Object value) { - List params = new ArrayList<>(); - - // preconditions - if (value == null || !(value instanceof Map )) { - return params; - } - - @SuppressWarnings("unchecked") - final Map valuesMap = (Map) value; - - for (Map.Entry entry : valuesMap.entrySet()) { - params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); - } - - return params; - } - - - /** - * Formats the specified collection path parameter to a string value. - * - * @param collectionFormat The collection format of the parameter. - * @param value The value of the parameter. - * @return String representation of the parameter - */ - public String collectionPathParameterToString(String collectionFormat, Collection value) { - // create the value based on the collection format - if ("multi".equals(collectionFormat)) { - // not valid for path params - return parameterToString(value); - } - - // collectionFormat is assumed to be "csv" by default - String delimiter = ","; - - if ("ssv".equals(collectionFormat)) { - delimiter = " "; - } else if ("tsv".equals(collectionFormat)) { - delimiter = "\t"; - } else if ("pipes".equals(collectionFormat)) { - delimiter = "|"; - } - - StringBuilder sb = new StringBuilder() ; - for (Object item : value) { - sb.append(delimiter); - sb.append(parameterToString(item)); - } - - return sb.substring(delimiter.length()); - } - - /** - * Sanitize filename by removing path. - * e.g. ../../sun.gif becomes sun.gif - * - * @param filename The filename to be sanitized - * @return The sanitized filename - */ - public String sanitizeFilename(String filename) { - return filename.replaceFirst("^.*[/\\\\]", ""); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * "* / *" is also default to JSON - * @param mime MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public boolean isJsonMime(String mime) { - String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; - return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); - } - - /** - * Select the Accept header's value from the given accepts array: - * if JSON exists in the given array, use it; - * otherwise use all of them (joining into a string) - * - * @param accepts The accepts array to select from - * @return The Accept header to use. If the given array is empty, - * null will be returned (not to set the Accept header explicitly). - */ - public String selectHeaderAccept(String[] accepts) { - if (accepts.length == 0) { - return null; - } - for (String accept : accepts) { - if (isJsonMime(accept)) { - return accept; - } - } - return StringUtil.join(accepts, ","); - } - - /** - * Select the Content-Type header's value from the given array: - * if JSON exists in the given array, use it; - * otherwise use the first one of the array. - * - * @param contentTypes The Content-Type array to select from - * @return The Content-Type header to use. If the given array is empty, - * returns null. If it matches "any", JSON will be used. - */ - public String selectHeaderContentType(String[] contentTypes) { - if (contentTypes.length == 0) { - return null; - } - - if (contentTypes[0].equals("*/*")) { - return "application/json"; - } - - for (String contentType : contentTypes) { - if (isJsonMime(contentType)) { - return contentType; - } - } - - return contentTypes[0]; - } - - /** - * Escape the given string to be used as URL query value. - * - * @param str String to be escaped - * @return Escaped string - */ - public String escapeString(String str) { - try { - return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); - } catch (UnsupportedEncodingException e) { - return str; - } - } - - /** - * Deserialize response body to Java object, according to the return type and - * the Content-Type response header. - * - * @param Type - * @param response HTTP response - * @param returnType The type of the Java object - * @return The deserialized Java object - * @throws org.openapitools.client.ApiException If fail to deserialize response body, i.e. cannot read response body - * or the Content-Type of the response is not supported. - */ - @SuppressWarnings("unchecked") - public T deserialize(Response response, Type returnType) throws ApiException { - if (response == null || returnType == null) { - return null; - } - - if ("byte[]".equals(returnType.toString())) { - // Handle binary response (byte array). - try { - return (T) response.body().bytes(); - } catch (IOException e) { - throw new ApiException(e); - } - } else if (returnType.equals(File.class)) { - // Handle file downloading. - return (T) downloadFileFromResponse(response); - } - - ResponseBody respBody = response.body(); - if (respBody == null) { - return null; - } - - String contentType = response.headers().get("Content-Type"); - if (contentType == null) { - // ensuring a default content type - contentType = "application/json"; - } - try { - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody.byteStream(), returnType); - } else if (returnType.equals(String.class)) { - String respBodyString = respBody.string(); - if (respBodyString.isEmpty()) { - return null; - } - // Expecting string, return the raw response body. - return (T) respBodyString; - } else { - throw new ApiException( - "Content type \"" + contentType + "\" is not supported for type: " + returnType, - response.code(), - response.headers().toMultimap(), - response.body().string()); - } - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Serialize the given Java object into request body according to the object's - * class and the request Content-Type. - * - * @param obj The Java object - * @param contentType The request Content-Type - * @return The serialized request body - * @throws org.openapitools.client.ApiException If fail to serialize the given object - */ - public RequestBody serialize(Object obj, String contentType) throws ApiException { - if (obj instanceof byte[]) { - // Binary (byte array) body parameter support. - return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); - } else if (obj instanceof File) { - // File body parameter support. - return RequestBody.create((File) obj, MediaType.parse(contentType)); - } else if ("text/plain".equals(contentType) && obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else if (isJsonMime(contentType)) { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - return RequestBody.create(content, MediaType.parse(contentType)); - } else if (obj instanceof String) { - return RequestBody.create((String) obj, MediaType.parse(contentType)); - } else { - throw new ApiException("Content type \"" + contentType + "\" is not supported"); - } - } - - /** - * Download file from the given response. - * - * @param response An instance of the Response object - * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk - * @return Downloaded file - */ - public File downloadFileFromResponse(Response response) throws ApiException { - try { - File file = prepareDownloadFile(response); - BufferedSink sink = Okio.buffer(Okio.sink(file)); - sink.writeAll(response.body().source()); - sink.close(); - return file; - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * Prepare file for download - * - * @param response An instance of the Response object - * @return Prepared file for the download - * @throws java.io.IOException If fail to prepare file for download - */ - public File prepareDownloadFile(Response response) throws IOException { - String filename = null; - String contentDisposition = response.header("Content-Disposition"); - if (contentDisposition != null && !"".equals(contentDisposition)) { - // Get filename from the Content-Disposition header. - Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); - Matcher matcher = pattern.matcher(contentDisposition); - if (matcher.find()) { - filename = sanitizeFilename(matcher.group(1)); - } - } - - String prefix = null; - String suffix = null; - if (filename == null) { - prefix = "download-"; - suffix = ""; - } else { - int pos = filename.lastIndexOf("."); - if (pos == -1) { - prefix = filename + "-"; - } else { - prefix = filename.substring(0, pos) + "-"; - suffix = filename.substring(pos); - } - // Files.createTempFile requires the prefix to be at least three characters long - if (prefix.length() < 3) - prefix = "download-"; - } - - if (tempFolderPath == null) - return Files.createTempFile(prefix, suffix).toFile(); - else - return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); - } - - /** - * {@link #execute(Call, Type)} - * - * @param Type - * @param call An instance of the Call object - * @return ApiResponse<T> - * @throws org.openapitools.client.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call) throws ApiException { - return execute(call, null); - } - - /** - * Execute HTTP call and deserialize the HTTP response body into the given return type. - * - * @param returnType The return type used to deserialize HTTP response body - * @param The return type corresponding to (same with) returnType - * @param call Call - * @return ApiResponse object containing response status, headers and - * data, which is a Java object deserialized from response body and would be null - * when returnType is null. - * @throws org.openapitools.client.ApiException If fail to execute the call - */ - public ApiResponse execute(Call call, Type returnType) throws ApiException { - try { - Response response = call.execute(); - T data = handleResponse(response, returnType); - return new ApiResponse(response.code(), response.headers().toMultimap(), data); - } catch (IOException e) { - throw new ApiException(e); - } - } - - /** - * {@link #executeAsync(Call, Type, ApiCallback)} - * - * @param Type - * @param call An instance of the Call object - * @param callback ApiCallback<T> - */ - public void executeAsync(Call call, ApiCallback callback) { - executeAsync(call, null, callback); - } - - /** - * Execute HTTP call asynchronously. - * - * @param Type - * @param call The callback to be executed when the API call finishes - * @param returnType Return type - * @param callback ApiCallback - * @see #execute(Call, Type) - */ - @SuppressWarnings("unchecked") - public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { - call.enqueue(new Callback() { - @Override - public void onFailure(Call call, IOException e) { - callback.onFailure(new ApiException(e), 0, null); - } - - @Override - public void onResponse(Call call, Response response) throws IOException { - T result; - try { - result = (T) handleResponse(response, returnType); - } catch (ApiException e) { - callback.onFailure(e, response.code(), response.headers().toMultimap()); - return; - } catch (Exception e) { - callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); - return; - } - callback.onSuccess(result, response.code(), response.headers().toMultimap()); - } - }); - } - - /** - * Handle the given response, return the deserialized object when the response is successful. - * - * @param Type - * @param response Response - * @param returnType Return type - * @return Type - * @throws org.openapitools.client.ApiException If the response has an unsuccessful status code or - * fail to deserialize the response body - */ - public T handleResponse(Response response, Type returnType) throws ApiException { - if (response.isSuccessful()) { - if (returnType == null || response.code() == 204) { - // returning null if the returnType is not defined, - // or the status code is 204 (No Content) - if (response.body() != null) { - try { - response.body().close(); - } catch (Exception e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - return null; - } else { - return deserialize(response, returnType); - } - } else { - String respBody = null; - if (response.body() != null) { - try { - respBody = response.body().string(); - } catch (IOException e) { - throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); - } - } - throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); - } - } - - /** - * Build HTTP call with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP call - * @throws org.openapitools.client.ApiException If fail to serialize the request body object - */ - public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); - - return httpClient.newCall(request); - } - - /** - * Build an HTTP request with the given options. - * - * @param baseUrl The base URL - * @param path The sub-path of the HTTP URL - * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @param body The request body object - * @param headerParams The header parameters - * @param cookieParams The cookie parameters - * @param formParams The form parameters - * @param authNames The authentications to apply - * @param callback Callback for upload/download progress - * @return The HTTP request - * @throws org.openapitools.client.ApiException If fail to serialize the request body object - */ - public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { - final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); - - // prepare HTTP request body - RequestBody reqBody; - String contentType = headerParams.get("Content-Type"); - String contentTypePure = contentType; - if (contentTypePure != null && contentTypePure.contains(";")) { - contentTypePure = contentType.substring(0, contentType.indexOf(";")); - } - if (!HttpMethod.permitsRequestBody(method)) { - reqBody = null; - } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { - reqBody = buildRequestBodyFormEncoding(formParams); - } else if ("multipart/form-data".equals(contentTypePure)) { - reqBody = buildRequestBodyMultipart(formParams); - } else if (body == null) { - if ("DELETE".equals(method)) { - // allow calling DELETE without sending a request body - reqBody = null; - } else { - // use an empty request body (for POST, PUT and PATCH) - reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); - } - } else { - reqBody = serialize(body, contentType); - } - - List updatedQueryParams = new ArrayList<>(queryParams); - - // update parameters with authentication settings - updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); - - final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); - processHeaderParams(headerParams, reqBuilder); - processCookieParams(cookieParams, reqBuilder); - - // Associate callback with request (if not null) so interceptor can - // access it when creating ProgressResponseBody - reqBuilder.tag(callback); - - Request request = null; - - if (callback != null && reqBody != null) { - ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); - request = reqBuilder.method(method, progressRequestBody).build(); - } else { - request = reqBuilder.method(method, reqBody).build(); - } - - return request; - } - - /** - * Build full URL by concatenating base path, the given sub path and query parameters. - * - * @param baseUrl The base URL - * @param path The sub path - * @param queryParams The query parameters - * @param collectionQueryParams The collection query parameters - * @return The full URL - */ - public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { - final StringBuilder url = new StringBuilder(); - if (baseUrl != null) { - url.append(baseUrl).append(path); - } else { - String baseURL; - if (serverIndex != null) { - if (serverIndex < 0 || serverIndex >= servers.size()) { - throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() - )); - } - baseURL = servers.get(serverIndex).URL(serverVariables); - } else { - baseURL = basePath; - } - url.append(baseURL).append(path); - } - - if (queryParams != null && !queryParams.isEmpty()) { - // support (constant) query string in `path`, e.g. "/posts?draft=1" - String prefix = path.contains("?") ? "&" : "?"; - for (Pair param : queryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); - } - } - } - - if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { - String prefix = url.toString().contains("?") ? "&" : "?"; - for (Pair param : collectionQueryParams) { - if (param.getValue() != null) { - if (prefix != null) { - url.append(prefix); - prefix = null; - } else { - url.append("&"); - } - String value = parameterToString(param.getValue()); - // collection query parameter value already escaped as part of parameterToPairs - url.append(escapeString(param.getName())).append("=").append(value); - } - } - } - - return url.toString(); - } - - /** - * Set header parameters to the request builder, including default headers. - * - * @param headerParams Header parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { - for (Entry param : headerParams.entrySet()) { - reqBuilder.header(param.getKey(), parameterToString(param.getValue())); - } - for (Entry header : defaultHeaderMap.entrySet()) { - if (!headerParams.containsKey(header.getKey())) { - reqBuilder.header(header.getKey(), parameterToString(header.getValue())); - } - } - } - - /** - * Set cookie parameters to the request builder, including default cookies. - * - * @param cookieParams Cookie parameters in the form of Map - * @param reqBuilder Request.Builder - */ - public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { - for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - for (Entry param : defaultCookieMap.entrySet()) { - if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); - } - } - } - - /** - * Update query and header parameters based on authentication settings. - * - * @param authNames The authentications to apply - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws org.openapitools.client.ApiException If fails to update the parameters - */ - public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, - Map cookieParams, String payload, String method, URI uri) throws ApiException { - for (String authName : authNames) { - Authentication auth = authentications.get(authName); - if (auth == null) { - throw new RuntimeException("Authentication undefined: " + authName); - } - auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); - } - } - - /** - * Build a form-encoding request body with the given form parameters. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyFormEncoding(Map formParams) { - okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); - for (Entry param : formParams.entrySet()) { - formBuilder.add(param.getKey(), parameterToString(param.getValue())); - } - return formBuilder.build(); - } - - /** - * Build a multipart (file uploading) request body with the given form parameters, - * which could contain text fields and file fields. - * - * @param formParams Form parameters in the form of Map - * @return RequestBody - */ - public RequestBody buildRequestBodyMultipart(Map formParams) { - MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); - for (Entry param : formParams.entrySet()) { - if (param.getValue() instanceof File) { - File file = (File) param.getValue(); - addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); - } else if (param.getValue() instanceof List) { - List list = (List) param.getValue(); - for (Object item: list) { - if (item instanceof File) { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - } else { - addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); - } - } - return mpBuilder.build(); - } - - /** - * Guess Content-Type header from the given file (defaults to "application/octet-stream"). - * - * @param file The given file - * @return The guessed Content-Type - */ - public String guessContentTypeFromFile(File file) { - String contentType = URLConnection.guessContentTypeFromName(file.getName()); - if (contentType == null) { - return "application/octet-stream"; - } else { - return contentType; - } - } - - /** - * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param file The file to add to the Header - */ - protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); - MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); - mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); - } - - /** - * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. - * - * @param mpBuilder MultipartBody.Builder - * @param key The key of the Header element - * @param obj The complex object to add to the Header - */ - protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { - RequestBody requestBody; - if (obj instanceof String) { - requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); - } else { - String content; - if (obj != null) { - content = JSON.serialize(obj); - } else { - content = null; - } - requestBody = RequestBody.create(content, MediaType.parse("application/json")); - } - - Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); - mpBuilder.addPart(partHeaders, requestBody); - } - - /** - * Get network interceptor to add it to the httpClient to track download progress for - * async requests. - */ - protected Interceptor getProgressInterceptor() { - return new Interceptor() { - @Override - public Response intercept(Interceptor.Chain chain) throws IOException { - final Request request = chain.request(); - final Response originalResponse = chain.proceed(request); - if (request.tag() instanceof ApiCallback) { - final ApiCallback callback = (ApiCallback) request.tag(); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), callback)) - .build(); - } - return originalResponse; - } - }; - } - - /** - * Apply SSL related settings to httpClient according to the current values of - * verifyingSsl and sslCaCert. - */ - protected void applySslSettings() { - try { - TrustManager[] trustManagers; - HostnameVerifier hostnameVerifier; - if (!verifyingSsl) { - trustManagers = new TrustManager[]{ - new X509TrustManager() { - @Override - public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { - } - - @Override - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return new java.security.cert.X509Certificate[]{}; - } - } - }; - hostnameVerifier = new HostnameVerifier() { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - }; - } else { - TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); - - if (sslCaCert == null) { - trustManagerFactory.init((KeyStore) null); - } else { - char[] password = null; // Any password will work. - CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(sslCaCert); - if (certificates.isEmpty()) { - throw new IllegalArgumentException("expected non-empty set of trusted certificates"); - } - KeyStore caKeyStore = newEmptyKeyStore(password); - int index = 0; - for (Certificate certificate : certificates) { - String certificateAlias = "ca" + (index++); - caKeyStore.setCertificateEntry(certificateAlias, certificate); - } - trustManagerFactory.init(caKeyStore); - } - trustManagers = trustManagerFactory.getTrustManagers(); - hostnameVerifier = OkHostnameVerifier.INSTANCE; - } - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(keyManagers, trustManagers, new SecureRandom()); - httpClient = httpClient.newBuilder() - .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) - .hostnameVerifier(hostnameVerifier) - .build(); - } catch (GeneralSecurityException e) { - throw new RuntimeException(e); - } - } - - protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { - try { - KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); - keyStore.load(null, password); - return keyStore; - } catch (IOException e) { - throw new AssertionError(e); - } - } - - /** - * Convert the HTTP request body to a string. - * - * @param requestBody The HTTP request object - * @return The string representation of the HTTP request body - * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string - */ - protected String requestBodyToString(RequestBody requestBody) throws ApiException { - if (requestBody != null) { - try { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return buffer.readUtf8(); - } catch (final IOException e) { - throw new ApiException(e); - } - } - - // empty http request body - return ""; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ApiException.java b/java-client/src/main/java/org/openapitools/client/ApiException.java deleted file mode 100644 index a6ce676..0000000 --- a/java-client/src/main/java/org/openapitools/client/ApiException.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Map; -import java.util.List; - - -/** - *

ApiException class.

- */ -@SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ApiException extends Exception { - private static final long serialVersionUID = 1L; - - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - /** - *

Constructor for ApiException.

- */ - public ApiException() {} - - /** - *

Constructor for ApiException.

- * - * @param throwable a {@link java.lang.Throwable} object - */ - public ApiException(Throwable throwable) { - super(throwable); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - */ - public ApiException(String message) { - super(message); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { - super(message, throwable); - this.code = code; - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(String message, int code, Map> responseHeaders, String responseBody) { - this(message, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param message the error message - * @param throwable a {@link java.lang.Throwable} object - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - */ - public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { - this(message, throwable, code, responseHeaders, null); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, Map> responseHeaders, String responseBody) { - this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message a {@link java.lang.String} object - */ - public ApiException(int code, String message) { - super(message); - this.code = code; - } - - /** - *

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", - super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ApiResponse.java b/java-client/src/main/java/org/openapitools/client/ApiResponse.java deleted file mode 100644 index 6309771..0000000 --- a/java-client/src/main/java/org/openapitools/client/ApiResponse.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - */ -public class ApiResponse { - final private int statusCode; - final private Map> headers; - final private T data; - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - */ - public ApiResponse(int statusCode, Map> headers) { - this(statusCode, headers, null); - } - - /** - *

Constructor for ApiResponse.

- * - * @param statusCode The status code of HTTP response - * @param headers The headers of HTTP response - * @param data The object deserialized from response bod - */ - public ApiResponse(int statusCode, Map> headers, T data) { - this.statusCode = statusCode; - this.headers = headers; - this.data = data; - } - - /** - *

Get the status code.

- * - * @return the status code - */ - public int getStatusCode() { - return statusCode; - } - - /** - *

Get the headers.

- * - * @return a {@link java.util.Map} of headers - */ - public Map> getHeaders() { - return headers; - } - - /** - *

Get the data.

- * - * @return the data - */ - public T getData() { - return data; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/Configuration.java b/java-client/src/main/java/org/openapitools/client/Configuration.java deleted file mode 100644 index e886102..0000000 --- a/java-client/src/main/java/org/openapitools/client/Configuration.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Objects; -import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Supplier; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class Configuration { - public static final String VERSION = "0.0.1"; - - private static final AtomicReference defaultApiClient = new AtomicReference<>(); - private static volatile Supplier apiClientFactory = ApiClient::new; - - /** - * Get the default API client, which would be used when creating API instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - ApiClient client = defaultApiClient.get(); - if (client == null) { - client = defaultApiClient.updateAndGet(val -> { - if (val != null) { // changed by another thread - return val; - } - return apiClientFactory.get(); - }); - } - return client; - } - - /** - * Set the default API client, which would be used when creating API instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient.set(apiClient); - } - - /** - * set the callback used to create new ApiClient objects - */ - public static void setApiClientFactory(Supplier factory) { - apiClientFactory = Objects.requireNonNull(factory); - } - - private Configuration() { - } -} \ No newline at end of file diff --git a/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java deleted file mode 100644 index 2495b27..0000000 --- a/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/JSON.java b/java-client/src/main/java/org/openapitools/client/JSON.java deleted file mode 100644 index a117931..0000000 --- a/java-client/src/main/java/org/openapitools/client/JSON.java +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; - -import okio.ByteString; - -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.nio.charset.StandardCharsets; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - static { - GsonBuilder gsonBuilder = createGson(); - gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); - gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); - gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); - gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); - gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Change.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ClusterDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EntityPairKVEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.EnvClusterInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ItemChangeSets.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ItemDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.KVEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ListItemDiffs.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ListReleaseBO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MapString.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceGrayDelReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceIdentifier.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceSyncModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceTextModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenAppDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenAppNamespaceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenClusterDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenCreateAppDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenGrayReleaseRuleDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenGrayReleaseRuleItemDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstanceConfigDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstanceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceLockDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenOrganizationDto.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenPageDTOOpenInstanceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenPageDTOOpenItemDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1AppsGet401Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1AppsPost400Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1AppsPostRequest.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenapiV1EnvsEnvReleasesCompareGet200Response.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ReleaseDTO.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** - * Deserialize the given JSON InputStream to a Java object. - * - * @param Type - * @param inputStream The JSON InputStream - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(InputStream inputStream, Type returnType) throws IOException { - try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { - if (isLenientOnJson) { - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - JsonReader jsonReader = new JsonReader(reader); - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(reader, returnType); - } - } - } - - /** - * Gson TypeAdapter for Byte Array type - */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/Pair.java b/java-client/src/main/java/org/openapitools/client/Pair.java deleted file mode 100644 index 800eebb..0000000 --- a/java-client/src/main/java/org/openapitools/client/Pair.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class Pair { - private final String name; - private final String value; - - public Pair(String name, String value) { - this.name = isValidString(name) ? name : ""; - this.value = isValidString(value) ? value : ""; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private static boolean isValidString(String arg) { - return arg != null; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java b/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java deleted file mode 100644 index 98e80f8..0000000 --- a/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - private final RequestBody requestBody; - - private final ApiCallback callback; - - public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { - this.requestBody = requestBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java b/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java deleted file mode 100644 index e71da88..0000000 --- a/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.MediaType; -import okhttp3.ResponseBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - private final ResponseBody responseBody; - private final ApiCallback callback; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { - this.responseBody = responseBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java b/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java deleted file mode 100644 index 6822d84..0000000 --- a/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replace("{" + name + "}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ServerVariable.java b/java-client/src/main/java/org/openapitools/client/ServerVariable.java deleted file mode 100644 index dc422ff..0000000 --- a/java-client/src/main/java/org/openapitools/client/ServerVariable.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/StringUtil.java b/java-client/src/main/java/org/openapitools/client/StringUtil.java deleted file mode 100644 index d6ae01f..0000000 --- a/java-client/src/main/java/org/openapitools/client/StringUtil.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

- * Note: This might be replaced by utility method from commons-lang or guava someday - * if one of those libraries is added as dependency. - *

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java deleted file mode 100644 index 7b82579..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java +++ /dev/null @@ -1,1831 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.EnvClusterInfo; -import org.openapitools.client.model.OpenAppDTO; -import org.openapitools.client.model.OpenEnvClusterDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1AppsPost400Response; -import org.openapitools.client.model.OpenapiV1AppsPostRequest; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class AppManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AppManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public AppManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1AppsAppIdAppnamespacesNamespaceNameDelete - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(Async)"); - } - - return openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteCall(appId, namespaceName, _callback); - - } - - /** - * 删除AppNamespace - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteWithHttpInfo(appId, namespaceName); - return localVarResp.getData(); - } - - /** - * 删除AppNamespace - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteValidateBeforeCall(appId, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 删除AppNamespace (asynchronously) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteValidateBeforeCall(appId, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdDelete - * @param appId (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdDeleteCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdDelete(Async)"); - } - - return openapiV1AppsAppIdDeleteCall(appId, _callback); - - } - - /** - * 删除应用 - * DELETE /openapi/v1/apps/{appId} - * @param appId (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public OpenapiV1AppsGet401Response openapiV1AppsAppIdDelete(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdDeleteWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 删除应用 - * DELETE /openapi/v1/apps/{appId} - * @param appId (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public ApiResponse openapiV1AppsAppIdDeleteWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdDeleteValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 删除应用 (asynchronously) - * DELETE /openapi/v1/apps/{appId} - * @param appId (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdDeleteAsync(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdDeleteValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdEnvClustersGet - * @param appId (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvClustersGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/env-clusters" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvClustersGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdEnvClustersGet(Async)"); - } - - return openapiV1AppsAppIdEnvClustersGetCall(appId, _callback); - - } - - /** - * 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters - * @param appId (required) - * @return List<OpenEnvClusterDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public List openapiV1AppsAppIdEnvClustersGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdEnvClustersGetWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters - * @param appId (required) - * @return ApiResponse<List<OpenEnvClusterDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public ApiResponse> openapiV1AppsAppIdEnvClustersGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvClustersGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用的环境集群信息 (asynchronously) - * GET /openapi/v1/apps/{appId}/env-clusters - * @param appId (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvClustersGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvClustersGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete - * @param appId (required) - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(Async)"); - } - - return openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 删除关联的Namespace - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 删除关联的Namespace - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 删除关联的Namespace (asynchronously) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * @param appId (required) - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdGet - * @param appId (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdGet(Async)"); - } - - return openapiV1AppsAppIdGetCall(appId, _callback); - - } - - /** - * 获取单个应用信息 - * GET /openapi/v1/apps/{appId} - * @param appId (required) - * @return OpenAppDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public OpenAppDTO openapiV1AppsAppIdGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdGetWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取单个应用信息 - * GET /openapi/v1/apps/{appId} - * @param appId (required) - * @return ApiResponse<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public ApiResponse openapiV1AppsAppIdGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取单个应用信息 (asynchronously) - * GET /openapi/v1/apps/{appId} - * @param appId (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdMissEnvsGet - * @param appId (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdMissEnvsGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/miss_envs" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdMissEnvsGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdMissEnvsGet(Async)"); - } - - return openapiV1AppsAppIdMissEnvsGetCall(appId, _callback); - - } - - /** - * 查找缺失的环境 - * GET /openapi/v1/apps/{appId}/miss_envs - * @param appId (required) - * @return List<String> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
- */ - public List openapiV1AppsAppIdMissEnvsGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdMissEnvsGetWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 查找缺失的环境 - * GET /openapi/v1/apps/{appId}/miss_envs - * @param appId (required) - * @return ApiResponse<List<String>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
- */ - public ApiResponse> openapiV1AppsAppIdMissEnvsGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdMissEnvsGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查找缺失的环境 (asynchronously) - * GET /openapi/v1/apps/{appId}/miss_envs - * @param appId (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdMissEnvsGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdMissEnvsGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdNamespacesReleasesStatusGet - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/namespaces/releases/status" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdNamespacesReleasesStatusGet(Async)"); - } - - return openapiV1AppsAppIdNamespacesReleasesStatusGetCall(appId, _callback); - - } - - /** - * 获取应用下所有Namespace的发布状态 - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * @param appId (required) - * @return Map<String, Map<String, Boolean>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Map> openapiV1AppsAppIdNamespacesReleasesStatusGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse>> localVarResp = openapiV1AppsAppIdNamespacesReleasesStatusGetWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用下所有Namespace的发布状态 - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * @param appId (required) - * @return ApiResponse<Map<String, Map<String, Boolean>>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse>> openapiV1AppsAppIdNamespacesReleasesStatusGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdNamespacesReleasesStatusGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用下所有Namespace的发布状态 (asynchronously) - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdNamespacesReleasesStatusGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback>> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdNamespacesReleasesStatusGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdNavtreeGet - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
- */ - public okhttp3.Call openapiV1AppsAppIdNavtreeGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/navtree" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdNavtreeGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdNavtreeGet(Async)"); - } - - return openapiV1AppsAppIdNavtreeGetCall(appId, _callback); - - } - - /** - * 获取应用导航树 - * GET /openapi/v1/apps/{appId}/navtree - * @param appId (required) - * @return List<EnvClusterInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
- */ - public List openapiV1AppsAppIdNavtreeGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdNavtreeGetWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用导航树 - * GET /openapi/v1/apps/{appId}/navtree - * @param appId (required) - * @return ApiResponse<List<EnvClusterInfo>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
- */ - public ApiResponse> openapiV1AppsAppIdNavtreeGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdNavtreeGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用导航树 (asynchronously) - * GET /openapi/v1/apps/{appId}/navtree - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 成功获取应用导航树 -
- */ - public okhttp3.Call openapiV1AppsAppIdNavtreeGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdNavtreeGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdPut - * @param appId (required) - * @param openAppDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openAppDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdPut(Async)"); - } - - // verify the required parameter 'openAppDTO' is set - if (openAppDTO == null) { - throw new ApiException("Missing the required parameter 'openAppDTO' when calling openapiV1AppsAppIdPut(Async)"); - } - - return openapiV1AppsAppIdPutCall(appId, openAppDTO, _callback); - - } - - /** - * 更新应用 - * PUT /openapi/v1/apps/{appId} - * @param appId (required) - * @param openAppDTO (required) - * @return OpenAppDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenAppDTO openapiV1AppsAppIdPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdPutWithHttpInfo(appId, openAppDTO); - return localVarResp.getData(); - } - - /** - * 更新应用 - * PUT /openapi/v1/apps/{appId} - * @param appId (required) - * @param openAppDTO (required) - * @return ApiResponse<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1AppsAppIdPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdPutValidateBeforeCall(appId, openAppDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 更新应用 (asynchronously) - * PUT /openapi/v1/apps/{appId} - * @param appId (required) - * @param openAppDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdPutValidateBeforeCall(appId, openAppDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsBySelfGet - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1AppsBySelfGetCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/by-self"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsBySelfGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return openapiV1AppsBySelfGetCall(_callback); - - } - - /** - * 获取当前Consumer的应用列表(分页) - * GET /openapi/v1/apps/by-self - * @return List<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public List openapiV1AppsBySelfGet() throws ApiException { - ApiResponse> localVarResp = openapiV1AppsBySelfGetWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取当前Consumer的应用列表(分页) - * GET /openapi/v1/apps/by-self - * @return ApiResponse<List<OpenAppDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public ApiResponse> openapiV1AppsBySelfGetWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsBySelfGetValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取当前Consumer的应用列表(分页) (asynchronously) - * GET /openapi/v1/apps/by-self - * @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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1AppsBySelfGetAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsBySelfGetValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsEnvsEnvPost - * @param env (required) - * @param openAppDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsEnvsEnvPostCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openAppDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/envs/{env}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsEnvsEnvPostValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO, 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 openapiV1AppsEnvsEnvPost(Async)"); - } - - // verify the required parameter 'openAppDTO' is set - if (openAppDTO == null) { - throw new ApiException("Missing the required parameter 'openAppDTO' when calling openapiV1AppsEnvsEnvPost(Async)"); - } - - return openapiV1AppsEnvsEnvPostCall(env, openAppDTO, _callback); - - } - - /** - * 在指定环境创建应用 - * POST /openapi/v1/apps/envs/{env} - * @param env (required) - * @param openAppDTO (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenapiV1AppsGet401Response openapiV1AppsEnvsEnvPost(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsEnvsEnvPostWithHttpInfo(env, openAppDTO); - return localVarResp.getData(); - } - - /** - * 在指定环境创建应用 - * POST /openapi/v1/apps/envs/{env} - * @param env (required) - * @param openAppDTO (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1AppsEnvsEnvPostWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsEnvsEnvPostValidateBeforeCall(env, openAppDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 在指定环境创建应用 (asynchronously) - * POST /openapi/v1/apps/envs/{env} - * @param env (required) - * @param openAppDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsEnvsEnvPostAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsEnvsEnvPostValidateBeforeCall(env, openAppDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsGet - * @param authorized 是否只返回授权的应用 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1AppsGetCall(@javax.annotation.Nullable String authorized, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (authorized != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("authorized", authorized)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsGetValidateBeforeCall(@javax.annotation.Nullable String authorized, final ApiCallback _callback) throws ApiException { - return openapiV1AppsGetCall(authorized, _callback); - - } - - /** - * 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true - * @param authorized 是否只返回授权的应用 (optional) - * @return List<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public List openapiV1AppsGet(@javax.annotation.Nullable String authorized) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsGetWithHttpInfo(authorized); - return localVarResp.getData(); - } - - /** - * 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true - * @param authorized 是否只返回授权的应用 (optional) - * @return ApiResponse<List<OpenAppDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public ApiResponse> openapiV1AppsGetWithHttpInfo(@javax.annotation.Nullable String authorized) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsGetValidateBeforeCall(authorized, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取当前Consumer授权的应用列表 (asynchronously) - * GET /openapi/v1/apps?authorized=true - * @param authorized 是否只返回授权的应用 (optional) - * @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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1AppsGetAsync(@javax.annotation.Nullable String authorized, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsGetValidateBeforeCall(authorized, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsPost - * @param openapiV1AppsPostRequest (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsPostCall(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openapiV1AppsPostRequest; - - // create path and map variables - String localVarPath = "/openapi/v1/apps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsPostValidateBeforeCall(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'openapiV1AppsPostRequest' is set - if (openapiV1AppsPostRequest == null) { - throw new ApiException("Missing the required parameter 'openapiV1AppsPostRequest' when calling openapiV1AppsPost(Async)"); - } - - return openapiV1AppsPostCall(openapiV1AppsPostRequest, _callback); - - } - - /** - * 创建应用 - * POST /openapi/v1/apps - * @param openapiV1AppsPostRequest (required) - * @return OpenAppDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenAppDTO openapiV1AppsPost(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest) throws ApiException { - ApiResponse localVarResp = openapiV1AppsPostWithHttpInfo(openapiV1AppsPostRequest); - return localVarResp.getData(); - } - - /** - * 创建应用 - * POST /openapi/v1/apps - * @param openapiV1AppsPostRequest (required) - * @return ApiResponse<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1AppsPostWithHttpInfo(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsPostValidateBeforeCall(openapiV1AppsPostRequest, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建应用 (asynchronously) - * POST /openapi/v1/apps - * @param openapiV1AppsPostRequest (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsPostAsync(@javax.annotation.Nonnull OpenapiV1AppsPostRequest openapiV1AppsPostRequest, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsPostValidateBeforeCall(openapiV1AppsPostRequest, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java deleted file mode 100644 index 36c311b..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java +++ /dev/null @@ -1,853 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenClusterDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ClusterManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ClusterManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public ClusterManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1AppsAppIdClustersClusterNameGet - * @param appId (required) - * @param clusterName (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/clusters/{clusterName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdClustersClusterNameGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdClustersClusterNameGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdClustersClusterNameGet(Async)"); - } - - return openapiV1AppsAppIdClustersClusterNameGetCall(appId, clusterName, _callback); - - } - - /** - * 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @return OpenClusterDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public OpenClusterDTO openapiV1AppsAppIdClustersClusterNameGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdClustersClusterNameGetWithHttpInfo(appId, clusterName); - return localVarResp.getData(); - } - - /** - * 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @return ApiResponse<OpenClusterDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public ApiResponse openapiV1AppsAppIdClustersClusterNameGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameGetValidateBeforeCall(appId, clusterName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定集群信息 (asynchronously) - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameGetValidateBeforeCall(appId, clusterName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdClustersPost - * @param appId (required) - * @param openClusterDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openClusterDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/clusters" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdClustersPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdClustersPost(Async)"); - } - - // verify the required parameter 'openClusterDTO' is set - if (openClusterDTO == null) { - throw new ApiException("Missing the required parameter 'openClusterDTO' when calling openapiV1AppsAppIdClustersPost(Async)"); - } - - return openapiV1AppsAppIdClustersPostCall(appId, openClusterDTO, _callback); - - } - - /** - * 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * @param appId (required) - * @param openClusterDTO (required) - * @return OpenClusterDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenClusterDTO openapiV1AppsAppIdClustersPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdClustersPostWithHttpInfo(appId, openClusterDTO); - return localVarResp.getData(); - } - - /** - * 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * @param appId (required) - * @param openClusterDTO (required) - * @return ApiResponse<OpenClusterDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1AppsAppIdClustersPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersPostValidateBeforeCall(appId, openClusterDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建集群 (asynchronously) - * POST /openapi/v1/apps/{appId}/clusters - * @param appId (required) - * @param openClusterDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersPostValidateBeforeCall(appId, openClusterDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete - * @param env (required) - * @param appId (required) - * @param clusterName (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 - - - - - - - -
Response Details
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteCall(env, appId, clusterName, _callback); - - } - - /** - * 删除集群 - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Response Details
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteWithHttpInfo(env, appId, clusterName); - return localVarResp.getData(); - } - - /** - * 删除集群 - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Response Details
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateBeforeCall(env, appId, clusterName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 删除集群 (asynchronously) - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param env (required) - * @param appId (required) - * @param clusterName (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 - - - - - - - -
Response Details
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteValidateBeforeCall(env, appId, clusterName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet - * @param appId (required) - * @param env (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 - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取命名空间分支信息 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取命名空间分支信息 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取命名空间分支信息 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * @param appId (required) - * @param env (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 - - - - - -
Response Details
Status Code Description Response Headers
200 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (fillItemDetail != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); - - } - - /** - * 获取指定的Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetWithHttpInfo(appId, env, clusterName, namespaceName, fillItemDetail); - return localVarResp.getData(); - } - - /** - * 获取指定的Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定的Namespace (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} 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 deleted file mode 100644 index 2ea52e7..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java +++ /dev/null @@ -1,551 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenInstanceDTO; -import org.openapitools.client.model.OpenPageDTOOpenInstanceDTO; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class InstanceManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public InstanceManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public InstanceManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - .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(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - return openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(appId, clusterName, namespaceName, _callback); - - } - - /** - * 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Integer openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(appId, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(appId, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取命名空间下的实例数量 (asynchronously) - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(appId, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/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())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (excludeReleases != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("excludeReleases", excludeReleases)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); - - } - - /** - * 查询不在指定发布版本中的实例 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) - * @return List<OpenInstanceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases); - return localVarResp.getData(); - } - - /** - * 查询不在指定发布版本中的实例 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) - * @return ApiResponse<List<OpenInstanceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询不在指定发布版本中的实例 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) - * @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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nullable String excludeReleases, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvReleasesReleaseIdInstancesGet - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/instances" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - 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" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull 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 openapiV1EnvsEnvReleasesReleaseIdInstancesGet(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 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet(Async)"); - } - - return openapiV1EnvsEnvReleasesReleaseIdInstancesGetCall(env, releaseId, page, size, _callback); - - } - - /** - * 根据发布版本查询实例(支持分页) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * @param env (required) - * @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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenPageDTOOpenInstanceDTO openapiV1EnvsEnvReleasesReleaseIdInstancesGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(env, releaseId, page, size); - return localVarResp.getData(); - } - - /** - * 根据发布版本查询实例(支持分页) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * @param env (required) - * @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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdInstancesGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 根据发布版本查询实例(支持分页) (asynchronously) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdInstancesGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdInstancesGetValidateBeforeCall(env, releaseId, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java deleted file mode 100644 index 45c418c..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java +++ /dev/null @@ -1,2403 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ListItemDiffs; -import org.openapitools.client.model.NamespaceSyncModel; -import org.openapitools.client.model.NamespaceTextModel; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenPageDTOOpenItemDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ItemManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ItemManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public ItemManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteCall(appId, env, clusterName, namespaceName, key, operator, _callback); - - } - - /** - * 通过编码的key删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); - return localVarResp.getData(); - } - - /** - * 通过编码的key删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 通过编码的key删除配置项 (asynchronously) - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetCall(appId, env, clusterName, namespaceName, key, _callback); - - } - - /** - * 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return OpenItemDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - public OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetWithHttpInfo(appId, env, clusterName, namespaceName, key); - return localVarResp.getData(); - } - - /** - * 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return ApiResponse<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 通过查询参数获取配置项(支持编码的key) (asynchronously) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (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 - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openItemDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (createIfNotExists != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'createIfNotExists' is set - if (createIfNotExists == null) { - throw new ApiException("Missing the required parameter 'createIfNotExists' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - - } - - /** - * 通过编码的key更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - return localVarResp.getData(); - } - - /** - * 通过编码的key更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 通过编码的key更新配置项 (asynchronously) - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (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 - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceTextModel; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); - } - - // verify the required parameter 'namespaceTextModel' is set - if (namespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'namespaceTextModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); - - } - - /** - * 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutWithHttpInfo(appId, env, clusterName, namespaceName, namespaceTextModel); - return localVarResp.getData(); - } - - /** - * 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 通过文本批量修改配置项 (asynchronously) - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 批量更新配置项成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (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 - - - - -
Response Details
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceSyncModel; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); - } - - // verify the required parameter 'namespaceSyncModel' is set - if (namespaceSyncModel == null) { - throw new ApiException("Missing the required parameter 'namespaceSyncModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); - - } - - /** - * 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return List<ListItemDiffs> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceSyncModel); - return localVarResp.getData(); - } - - /** - * 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return ApiResponse<List<ListItemDiffs>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 对比命名空间配置差异 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (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 - - - - -
Response Details
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - 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" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetCall(appId, env, clusterName, namespaceName, page, size, _callback); - - } - - /** - * 获取命名空间下的配置项列表 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return OpenPageDTOOpenItemDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - public OpenPageDTOOpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetWithHttpInfo(appId, env, clusterName, namespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取命名空间下的配置项列表 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<OpenPageDTOOpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取命名空间下的配置项列表 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteCall(appId, env, clusterName, namespaceName, key, operator, _callback); - - } - - /** - * 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); - return localVarResp.getData(); - } - - /** - * 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 删除配置项 (asynchronously) - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetCall(appId, env, clusterName, namespaceName, key, _callback); - - } - - /** - * 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return OpenItemDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - public OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetWithHttpInfo(appId, env, clusterName, namespaceName, key); - return localVarResp.getData(); - } - - /** - * 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @return ApiResponse<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取单个配置项 (asynchronously) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetValidateBeforeCall(appId, env, clusterName, namespaceName, key, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (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 - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openItemDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (createIfNotExists != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'createIfNotExists' is set - if (createIfNotExists == null) { - throw new ApiException("Missing the required parameter 'createIfNotExists' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - - } - - /** - * 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - return localVarResp.getData(); - } - - /** - * 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 更新配置项 (asynchronously) - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (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 - - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String key, @javax.annotation.Nonnull Boolean createIfNotExists, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openItemDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openItemDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); - } - - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostCall(appId, env, clusterName, namespaceName, openItemDTO, _callback); - - } - - /** - * 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openItemDTO (required) - * @return OpenItemDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenItemDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostWithHttpInfo(appId, env, clusterName, namespaceName, openItemDTO); - return localVarResp.getData(); - } - - /** - * 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openItemDTO (required) - * @return ApiResponse<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建新的配置项 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openItemDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost - * @param appId (required) - * @param env (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 撤销配置项更改 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * @param appId (required) - * @param env (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceSyncModel; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); - } - - // verify the required parameter 'namespaceSyncModel' is set - if (namespaceSyncModel == null) { - throw new ApiException("Missing the required parameter 'namespaceSyncModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); - - } - - /** - * 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return OpenapiV1AppsGet401Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenapiV1AppsGet401Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceSyncModel); - return localVarResp.getData(); - } - - /** - * 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return ApiResponse<OpenapiV1AppsGet401Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 同步配置项到多个命名空间 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceSyncModel namespaceSyncModel, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceSyncModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (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 - - - - - -
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceTextModel; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); - } - - // verify the required parameter 'namespaceTextModel' is set - if (namespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'namespaceTextModel' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); - - } - - /** - * 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceTextModel); - return localVarResp.getData(); - } - - /** - * 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (required) - * @return ApiResponse<OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 验证配置文本语法 (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceTextModel (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 - - - - - -
Response Details
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceTextModel namespaceTextModel, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceTextModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java deleted file mode 100644 index 08b4321..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java +++ /dev/null @@ -1,1716 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenGrayReleaseRuleDTO; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NamespaceBranchManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NamespaceBranchManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public NamespaceBranchManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostCall(appId, env, clusterName, namespaceName, operator, _callback); - - } - - /** - * 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostWithHttpInfo(appId, env, clusterName, namespaceName, operator); - return localVarResp.getData(); - } - - /** - * 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建命名空间分支 (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - .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("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); - - } - - /** - * 删除命名空间分支 - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteWithHttpInfo(env, appId, clusterName, namespaceName, branchName, operator); - return localVarResp.getData(); - } - - /** - * 删除命名空间分支 - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 删除命名空间分支 (asynchronously) - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceGrayDelReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceGrayDelReleaseDTO' is set - if (namespaceGrayDelReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceGrayDelReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, _callback); - - } - - /** - * 创建灰度删除发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); - return localVarResp.getData(); - } - - /** - * 创建灰度删除发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建灰度删除发布 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetCall(appId, env, clusterName, namespaceName, branchName, _callback); - - } - - /** - * 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return OpenGrayReleaseRuleDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenGrayReleaseRuleDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetWithHttpInfo(appId, env, clusterName, namespaceName, branchName); - return localVarResp.getData(); - } - - /** - * 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return ApiResponse<OpenGrayReleaseRuleDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取分支灰度发布规则 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openGrayReleaseRuleDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - if (operator != null) { - localVarHeaderParams.put("operator", localVarApiClient.parameterToString(operator)); - } - - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - // verify the required parameter 'openGrayReleaseRuleDTO' is set - if (openGrayReleaseRuleDTO == null) { - throw new ApiException("Missing the required parameter 'openGrayReleaseRuleDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); - - } - - /** - * 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutWithHttpInfo(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - return localVarResp.getData(); - } - - /** - * 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 更新分支灰度发布规则 (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull String operator, @javax.annotation.Nonnull OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetCall(appId, env, clusterName, namespaceName, branchName, _callback); - - } - - /** - * 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return List<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetWithHttpInfo(appId, env, clusterName, namespaceName, branchName); - return localVarResp.getData(); - } - - /** - * 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return ApiResponse<List<OpenItemDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取分支下的配置项 (asynchronously) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (deleteBranch != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'deleteBranch' is set - if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - - } - - /** - * 合并分支 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostWithHttpInfo(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 合并分支 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 合并分支 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - .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("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (deleteBranch != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - if (xApolloOperator != null) { - localVarHeaderParams.put("X-Apollo-Operator", localVarApiClient.parameterToString(xApolloOperator)); - } - - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, 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 openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'deleteBranch' is set - if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'xApolloOperator' is set - if (xApolloOperator == null) { - throw new ApiException("Missing the required parameter 'xApolloOperator' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO, _callback); - - } - - /** - * 合并分支到主分支 - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 合并分支到主分支 - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 合并分支到主分支 (asynchronously) - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull Boolean deleteBranch, @javax.annotation.Nonnull String xApolloOperator, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, _callback); - - } - - /** - * 创建灰度发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 创建灰度发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建灰度发布 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull String branchName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java deleted file mode 100644 index 4618f64..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java +++ /dev/null @@ -1,1401 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenAppNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceLockDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class NamespaceManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NamespaceManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public NamespaceManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1AppnamespacesGet - * @param publicOnly (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppnamespacesGetCall(@javax.annotation.Nonnull Boolean publicOnly, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/appnamespaces"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (publicOnly != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("publicOnly", publicOnly)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppnamespacesGetValidateBeforeCall(@javax.annotation.Nonnull Boolean publicOnly, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'publicOnly' is set - if (publicOnly == null) { - throw new ApiException("Missing the required parameter 'publicOnly' when calling openapiV1AppnamespacesGet(Async)"); - } - - return openapiV1AppnamespacesGetCall(publicOnly, _callback); - - } - - /** - * 获取所有公共AppNamespace - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) - * @return List<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1AppnamespacesGet(@javax.annotation.Nonnull Boolean publicOnly) throws ApiException { - ApiResponse> localVarResp = openapiV1AppnamespacesGetWithHttpInfo(publicOnly); - return localVarResp.getData(); - } - - /** - * 获取所有公共AppNamespace - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1AppnamespacesGetWithHttpInfo(@javax.annotation.Nonnull Boolean publicOnly) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppnamespacesGetValidateBeforeCall(publicOnly, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取所有公共AppNamespace (asynchronously) - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppnamespacesGetAsync(@javax.annotation.Nonnull Boolean publicOnly, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppnamespacesGetValidateBeforeCall(publicOnly, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdAppnamespacesGet - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesGetCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesGet(Async)"); - } - - return openapiV1AppsAppIdAppnamespacesGetCall(appId, _callback); - - } - - /** - * 获取指定应用的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return List<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1AppsAppIdAppnamespacesGet(@javax.annotation.Nonnull String appId) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdAppnamespacesGetWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取指定应用的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1AppsAppIdAppnamespacesGetWithHttpInfo(@javax.annotation.Nonnull String appId) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesGetValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定应用的AppNamespace (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesGetAsync(@javax.annotation.Nonnull String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesGetValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdAppnamespacesNamespaceNameGet - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet(Async)"); - } - - return openapiV1AppsAppIdAppnamespacesNamespaceNameGetCall(appId, namespaceName, _callback); - - } - - /** - * 获取指定的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) - * @return OpenAppNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesNamespaceNameGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdAppnamespacesNamespaceNameGetWithHttpInfo(appId, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取指定的AppNamespace - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (required) - * @param namespaceName (required) - * @return ApiResponse<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1AppsAppIdAppnamespacesNamespaceNameGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameGetValidateBeforeCall(appId, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定的AppNamespace (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesNamespaceNameGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesNamespaceNameGetValidateBeforeCall(appId, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdAppnamespacesPost - * @param appId (required) - * @param openAppNamespaceDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openAppNamespaceDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdAppnamespacesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdAppnamespacesPost(Async)"); - } - - // verify the required parameter 'openAppNamespaceDTO' is set - if (openAppNamespaceDTO == null) { - throw new ApiException("Missing the required parameter 'openAppNamespaceDTO' when calling openapiV1AppsAppIdAppnamespacesPost(Async)"); - } - - return openapiV1AppsAppIdAppnamespacesPostCall(appId, openAppNamespaceDTO, _callback); - - } - - /** - * 创建AppNamespace - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return OpenAppNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenAppNamespaceDTO openapiV1AppsAppIdAppnamespacesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdAppnamespacesPostWithHttpInfo(appId, openAppNamespaceDTO); - return localVarResp.getData(); - } - - /** - * 创建AppNamespace - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return ApiResponse<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1AppsAppIdAppnamespacesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesPostValidateBeforeCall(appId, openAppNamespaceDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建AppNamespace (asynchronously) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1AppsAppIdAppnamespacesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdAppnamespacesPostValidateBeforeCall(appId, openAppNamespaceDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet - * @param appId (required) - * @param env (required) - * @param clusterName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(Async)"); - } - - return openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetCall(appId, env, clusterName, _callback); - - } - - /** - * 检查缺失的Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return List<String> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName) throws ApiException { - ApiResponse> localVarResp = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetWithHttpInfo(appId, env, clusterName); - return localVarResp.getData(); - } - - /** - * 检查缺失的Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return ApiResponse<List<String>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetValidateBeforeCall(appId, env, clusterName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 检查缺失的Namespace (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * @param appId (required) - * @param env (required) - * @param clusterName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetValidateBeforeCall(appId, env, clusterName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet - * @param appId (required) - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(Async)"); - } - - return openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取关联的公共Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceDTO openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取关联的公共Namespace - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取关联的公共Namespace (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId (required) - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet - * @param env (required) - * @param publicNamespaceName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "publicNamespaceName" + "}", localVarApiClient.escapeString(publicNamespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - 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" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull 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 openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'publicNamespaceName' is set - if (publicNamespaceName == null) { - throw new ApiException("Missing the required parameter 'publicNamespaceName' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(Async)"); - } - - return openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetCall(env, publicNamespaceName, page, size, _callback); - - } - - /** - * 获取公共AppNamespace的所有实例 - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) - * @return List<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetWithHttpInfo(env, publicNamespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取公共AppNamespace的所有实例 - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<List<OpenNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetValidateBeforeCall(env, publicNamespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取公共AppNamespace的所有实例 (asynchronously) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env (required) - * @param publicNamespaceName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull String publicNamespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetValidateBeforeCall(env, publicNamespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (fillItemDetail != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); - } - - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetCall(appId, env, clusterName, fillItemDetail, _callback); - - } - - /** - * 获取指定集群下的所有Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return List<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetWithHttpInfo(appId, env, clusterName, fillItemDetail); - return localVarResp.getData(); - } - - /** - * 获取指定集群下的所有Namespace - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return ApiResponse<List<OpenNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetValidateBeforeCall(appId, env, clusterName, fillItemDetail, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定集群下的所有Namespace (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull Boolean fillItemDetail, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetValidateBeforeCall(appId, env, clusterName, fillItemDetail, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet - * @param appId (required) - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取Namespace的锁状态 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenNamespaceLockDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceLockDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取Namespace的锁状态 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceLockDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取Namespace的锁状态 (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * @param appId (required) - * @param env (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java deleted file mode 100644 index 7047747..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenOrganizationDto; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class OrganizationManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public OrganizationManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public OrganizationManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1OrganizationsGet - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1OrganizationsGetCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/organizations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1OrganizationsGetValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return openapiV1OrganizationsGetCall(_callback); - - } - - /** - * 获取所有组织信息 - * GET /openapi/v1/organizations - * @return List<OpenOrganizationDto> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public List openapiV1OrganizationsGet() throws ApiException { - ApiResponse> localVarResp = openapiV1OrganizationsGetWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取所有组织信息 - * GET /openapi/v1/organizations - * @return ApiResponse<List<OpenOrganizationDto>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public ApiResponse> openapiV1OrganizationsGetWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = openapiV1OrganizationsGetValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取所有组织信息 (asynchronously) - * GET /openapi/v1/organizations - * @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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public okhttp3.Call openapiV1OrganizationsGetAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1OrganizationsGetValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java deleted file mode 100644 index 3326841..0000000 --- a/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java +++ /dev/null @@ -1,1221 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ListReleaseBO; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ReleaseManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReleaseManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReleaseManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - 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" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetCall(appId, env, clusterName, namespaceName, page, size, _callback); - - } - - /** - * 获取活跃发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return List<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetWithHttpInfo(appId, env, clusterName, namespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取活跃发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<List<OpenReleaseDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取活跃发布(分页) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - 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" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetCall(appId, env, clusterName, namespaceName, page, size, _callback); - - } - - /** - * 获取所有发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return List<ListReleaseBO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public List openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - ApiResponse> localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetWithHttpInfo(appId, env, clusterName, namespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取所有发布(分页) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<List<ListReleaseBO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取所有发布(分页) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull Integer page, @javax.annotation.Nonnull Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet - * @param appId (required) - * @param env (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取最新活跃发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取最新活跃发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取最新活跃发布 (asynchronously) - * - * @param appId (required) - * @param env (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 - - - - - -
Response Details
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostValidateBeforeCall(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(Async)"); - } - - return openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, _callback); - - } - - /** - * 创建发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostWithHttpInfo(appId, env, clusterName, namespaceName, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 创建发布 - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Response Details
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public ApiResponse openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostWithHttpInfo(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建发布 (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceReleaseDTO (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 - - - - - - -
Response Details
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public okhttp3.Call openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostAsync(@javax.annotation.Nonnull String appId, @javax.annotation.Nonnull String env, @javax.annotation.Nonnull String clusterName, @javax.annotation.Nonnull String namespaceName, @javax.annotation.Nonnull NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvReleasesCompareGet - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/compare" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (baseReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("baseReleaseId", baseReleaseId)); - } - - if (toCompareReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("toCompareReleaseId", toCompareReleaseId)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesCompareGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId, 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 openapiV1EnvsEnvReleasesCompareGet(Async)"); - } - - // verify the required parameter 'baseReleaseId' is set - if (baseReleaseId == null) { - throw new ApiException("Missing the required parameter 'baseReleaseId' when calling openapiV1EnvsEnvReleasesCompareGet(Async)"); - } - - // verify the required parameter 'toCompareReleaseId' is set - if (toCompareReleaseId == null) { - throw new ApiException("Missing the required parameter 'toCompareReleaseId' when calling openapiV1EnvsEnvReleasesCompareGet(Async)"); - } - - return openapiV1EnvsEnvReleasesCompareGetCall(env, baseReleaseId, toCompareReleaseId, _callback); - - } - - /** - * 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return OpenapiV1EnvsEnvReleasesCompareGet200Response - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesCompareGetWithHttpInfo(env, baseReleaseId, toCompareReleaseId); - return localVarResp.getData(); - } - - /** - * 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return ApiResponse<OpenapiV1EnvsEnvReleasesCompareGet200Response> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvReleasesCompareGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesCompareGetValidateBeforeCall(env, baseReleaseId, toCompareReleaseId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 对比发布 (asynchronously) - * GET /openapi/v1/envs/{env}/releases/compare - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesCompareGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer baseReleaseId, @javax.annotation.Nonnull Integer toCompareReleaseId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesCompareGetValidateBeforeCall(env, baseReleaseId, toCompareReleaseId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvReleasesReleaseIdGet - * @param env (required) - * @param releaseId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, 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 openapiV1EnvsEnvReleasesReleaseIdGet(Async)"); - } - - // verify the required parameter 'releaseId' is set - if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling openapiV1EnvsEnvReleasesReleaseIdGet(Async)"); - } - - return openapiV1EnvsEnvReleasesReleaseIdGetCall(env, releaseId, _callback); - - } - - /** - * 获取发布详情 - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @param env (required) - * @param releaseId (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public OpenReleaseDTO openapiV1EnvsEnvReleasesReleaseIdGet(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdGetWithHttpInfo(env, releaseId); - return localVarResp.getData(); - } - - /** - * 获取发布详情 - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @param env (required) - * @param releaseId (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdGetWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdGetValidateBeforeCall(env, releaseId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取发布详情 (asynchronously) - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @param env (required) - * @param releaseId (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdGetAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdGetValidateBeforeCall(env, releaseId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for openapiV1EnvsEnvReleasesReleaseIdRollbackPut - * @param env (required) - * @param releaseId (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutValidateBeforeCall(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator, 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 openapiV1EnvsEnvReleasesReleaseIdRollbackPut(Async)"); - } - - // verify the required parameter 'releaseId' is set - if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut(Async)"); - } - - return openapiV1EnvsEnvReleasesReleaseIdRollbackPutCall(env, releaseId, operator, _callback); - - } - - /** - * 回滚发布 - * - * @param env (required) - * @param releaseId (required) - * @param operator (required) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public Object openapiV1EnvsEnvReleasesReleaseIdRollbackPut(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator) throws ApiException { - ApiResponse localVarResp = openapiV1EnvsEnvReleasesReleaseIdRollbackPutWithHttpInfo(env, releaseId, operator); - return localVarResp.getData(); - } - - /** - * 回滚发布 - * - * @param env (required) - * @param releaseId (required) - * @param operator (required) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public ApiResponse openapiV1EnvsEnvReleasesReleaseIdRollbackPutWithHttpInfo(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator) throws ApiException { - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdRollbackPutValidateBeforeCall(env, releaseId, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 回滚发布 (asynchronously) - * - * @param env (required) - * @param releaseId (required) - * @param operator (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 - - - - -
Response Details
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call openapiV1EnvsEnvReleasesReleaseIdRollbackPutAsync(@javax.annotation.Nonnull String env, @javax.annotation.Nonnull Integer releaseId, @javax.annotation.Nonnull String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = openapiV1EnvsEnvReleasesReleaseIdRollbackPutValidateBeforeCall(env, releaseId, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java deleted file mode 100644 index d0a9f34..0000000 --- a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/Authentication.java b/java-client/src/main/java/org/openapitools/client/auth/Authentication.java deleted file mode 100644 index c5a7052..0000000 --- a/java-client/src/main/java/org/openapitools/client/auth/Authentication.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java deleted file mode 100644 index ad03f3a..0000000 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import okhttp3.Credentials; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java deleted file mode 100644 index 77725ea..0000000 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.function.Supplier; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private Supplier tokenSupplier; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return tokenSupplier.get(); - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.tokenSupplier = () -> bearerToken; - } - - /** - * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header - */ - public void setBearerToken(Supplier tokenSupplier) { - this.tokenSupplier = tokenSupplier; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); - if (bearerToken == null) { - return; - } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java deleted file mode 100644 index 6ec91f4..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.openapitools.client.ApiException; -import java.util.Objects; -import java.lang.reflect.Type; -import java.util.Map; - -/** - * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map> getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - //@JsonValue - public Object getActualInstance() {return instance;} - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) {this.instance = instance;} - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) && - Objects.equals(this.isNullable, a.isNullable) && - Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } - - - -} diff --git a/java-client/src/main/java/org/openapitools/client/model/Change.java b/java-client/src/main/java/org/openapitools/client/model/Change.java deleted file mode 100644 index 9c6cbfb..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/Change.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.EntityPairKVEntity; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Change - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class Change { - /** - * - */ - @JsonAdapter(TypeEnum.Adapter.class) - public enum TypeEnum { - ADDED("ADDED"), - - MODIFIED("MODIFIED"), - - DELETED("DELETED"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public TypeEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return TypeEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - TypeEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private TypeEnum type; - - public static final String SERIALIZED_NAME_ENTITY = "entity"; - @SerializedName(SERIALIZED_NAME_ENTITY) - @javax.annotation.Nullable - private EntityPairKVEntity entity; - - public Change() { - } - - public Change type(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - @javax.annotation.Nullable - public TypeEnum getType() { - return type; - } - - public void setType(@javax.annotation.Nullable TypeEnum type) { - this.type = type; - } - - - public Change entity(@javax.annotation.Nullable EntityPairKVEntity entity) { - this.entity = entity; - return this; - } - - /** - * Get entity - * @return entity - */ - @javax.annotation.Nullable - public EntityPairKVEntity getEntity() { - return entity; - } - - public void setEntity(@javax.annotation.Nullable EntityPairKVEntity entity) { - this.entity = entity; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Change change = (Change) o; - return Objects.equals(this.type, change.type) && - Objects.equals(this.entity, change.entity); - } - - @Override - public int hashCode() { - return Objects.hash(type, entity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Change {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("type", "entity")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to Change - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!Change.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Change is not found in the empty JSON string", Change.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!Change.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Change` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - // validate the optional field `type` - if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { - TypeEnum.validateJsonElement(jsonObj.get("type")); - } - // validate the optional field `entity` - if (jsonObj.get("entity") != null && !jsonObj.get("entity").isJsonNull()) { - EntityPairKVEntity.validateJsonElement(jsonObj.get("entity")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!Change.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'Change' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(Change.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, Change value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public Change read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of Change given an JSON string - * - * @param jsonString JSON string - * @return An instance of Change - * @throws IOException if the JSON string is invalid with respect to Change - */ - public static Change fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, Change.class); - } - - /** - * Convert an instance of Change to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java deleted file mode 100644 index 2c15963..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/ClusterDTO.java +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ClusterDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ClusterDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nonnull - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nonnull - private String appId; - - public static final String SERIALIZED_NAME_PARENT_CLUSTER_ID = "parentClusterId"; - @SerializedName(SERIALIZED_NAME_PARENT_CLUSTER_ID) - @javax.annotation.Nullable - private Long parentClusterId; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public ClusterDTO() { - } - - public ClusterDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ClusterDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ClusterDTO dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ClusterDTO dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ClusterDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ClusterDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ClusterDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public ClusterDTO name(@javax.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nonnull String name) { - this.name = name; - } - - - public ClusterDTO appId(@javax.annotation.Nonnull String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nonnull - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nonnull String appId) { - this.appId = appId; - } - - - public ClusterDTO parentClusterId(@javax.annotation.Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - return this; - } - - /** - * - * @return parentClusterId - */ - @javax.annotation.Nullable - public Long getParentClusterId() { - return parentClusterId; - } - - public void setParentClusterId(@javax.annotation.Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - } - - - public ClusterDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClusterDTO clusterDTO = (ClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, clusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, clusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, clusterDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, clusterDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, clusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, clusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, clusterDTO.id) && - Objects.equals(this.name, clusterDTO.name) && - Objects.equals(this.appId, clusterDTO.appId) && - Objects.equals(this.parentClusterId, clusterDTO.parentClusterId) && - Objects.equals(this.comment, clusterDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, name, appId, parentClusterId, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" parentClusterId: ").append(toIndentedString(parentClusterId)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "name", "appId", "parentClusterId", "comment")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("name", "appId")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ClusterDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ClusterDTO is not found in the empty JSON string", ClusterDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ClusterDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ClusterDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : ClusterDTO.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ClusterDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ClusterDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ClusterDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ClusterDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ClusterDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ClusterDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ClusterDTO - * @throws IOException if the JSON string is invalid with respect to ClusterDTO - */ - public static ClusterDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ClusterDTO.class); - } - - /** - * Convert an instance of ClusterDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java b/java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java deleted file mode 100644 index aafa8bb..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/EntityPairKVEntity.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.KVEntity; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * EntityPairKVEntity - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EntityPairKVEntity { - public static final String SERIALIZED_NAME_FIRST_ENTITY = "firstEntity"; - @SerializedName(SERIALIZED_NAME_FIRST_ENTITY) - @javax.annotation.Nullable - private KVEntity firstEntity; - - public static final String SERIALIZED_NAME_SECOND_ENTITY = "secondEntity"; - @SerializedName(SERIALIZED_NAME_SECOND_ENTITY) - @javax.annotation.Nullable - private KVEntity secondEntity; - - public EntityPairKVEntity() { - } - - public EntityPairKVEntity firstEntity(@javax.annotation.Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - return this; - } - - /** - * Get firstEntity - * @return firstEntity - */ - @javax.annotation.Nullable - public KVEntity getFirstEntity() { - return firstEntity; - } - - public void setFirstEntity(@javax.annotation.Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - } - - - public EntityPairKVEntity secondEntity(@javax.annotation.Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - return this; - } - - /** - * Get secondEntity - * @return secondEntity - */ - @javax.annotation.Nullable - public KVEntity getSecondEntity() { - return secondEntity; - } - - public void setSecondEntity(@javax.annotation.Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EntityPairKVEntity entityPairKVEntity = (EntityPairKVEntity) o; - return Objects.equals(this.firstEntity, entityPairKVEntity.firstEntity) && - Objects.equals(this.secondEntity, entityPairKVEntity.secondEntity); - } - - @Override - public int hashCode() { - return Objects.hash(firstEntity, secondEntity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EntityPairKVEntity {\n"); - sb.append(" firstEntity: ").append(toIndentedString(firstEntity)).append("\n"); - sb.append(" secondEntity: ").append(toIndentedString(secondEntity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("firstEntity", "secondEntity")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EntityPairKVEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EntityPairKVEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EntityPairKVEntity is not found in the empty JSON string", EntityPairKVEntity.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EntityPairKVEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EntityPairKVEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `firstEntity` - if (jsonObj.get("firstEntity") != null && !jsonObj.get("firstEntity").isJsonNull()) { - KVEntity.validateJsonElement(jsonObj.get("firstEntity")); - } - // validate the optional field `secondEntity` - if (jsonObj.get("secondEntity") != null && !jsonObj.get("secondEntity").isJsonNull()) { - KVEntity.validateJsonElement(jsonObj.get("secondEntity")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EntityPairKVEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EntityPairKVEntity' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EntityPairKVEntity.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EntityPairKVEntity value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EntityPairKVEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of EntityPairKVEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of EntityPairKVEntity - * @throws IOException if the JSON string is invalid with respect to EntityPairKVEntity - */ - public static EntityPairKVEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EntityPairKVEntity.class); - } - - /** - * Convert an instance of EntityPairKVEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/EnvClusterInfo.java b/java-client/src/main/java/org/openapitools/client/model/EnvClusterInfo.java deleted file mode 100644 index 119b05a..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/EnvClusterInfo.java +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ClusterDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * EnvClusterInfo - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EnvClusterInfo { - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable - private String env; - - public static final String SERIALIZED_NAME_CLUSTERS = "clusters"; - @SerializedName(SERIALIZED_NAME_CLUSTERS) - @javax.annotation.Nullable - private List clusters = new ArrayList<>(); - - public EnvClusterInfo() { - } - - public EnvClusterInfo env(@javax.annotation.Nullable String env) { - this.env = env; - return this; - } - - /** - * - * @return env - */ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - public void setEnv(@javax.annotation.Nullable String env) { - this.env = env; - } - - - public EnvClusterInfo clusters(@javax.annotation.Nullable List clusters) { - this.clusters = clusters; - return this; - } - - public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - return this; - } - - /** - * - * @return clusters - */ - @javax.annotation.Nullable - public List getClusters() { - return clusters; - } - - public void setClusters(@javax.annotation.Nullable List clusters) { - this.clusters = clusters; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnvClusterInfo envClusterInfo = (EnvClusterInfo) o; - return Objects.equals(this.env, envClusterInfo.env) && - Objects.equals(this.clusters, envClusterInfo.clusters); - } - - @Override - public int hashCode() { - return Objects.hash(env, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnvClusterInfo {\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("env", "clusters")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EnvClusterInfo - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EnvClusterInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EnvClusterInfo is not found in the empty JSON string", EnvClusterInfo.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!EnvClusterInfo.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `EnvClusterInfo` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if (jsonObj.get("clusters") != null && !jsonObj.get("clusters").isJsonNull()) { - JsonArray jsonArrayclusters = jsonObj.getAsJsonArray("clusters"); - if (jsonArrayclusters != null) { - // ensure the json data is an array - if (!jsonObj.get("clusters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `clusters` to be an array in the JSON string but got `%s`", jsonObj.get("clusters").toString())); - } - - // validate the optional field `clusters` (array) - for (int i = 0; i < jsonArrayclusters.size(); i++) { - ClusterDTO.validateJsonElement(jsonArrayclusters.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EnvClusterInfo.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EnvClusterInfo' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EnvClusterInfo.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EnvClusterInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public EnvClusterInfo read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of EnvClusterInfo given an JSON string - * - * @param jsonString JSON string - * @return An instance of EnvClusterInfo - * @throws IOException if the JSON string is invalid with respect to EnvClusterInfo - */ - public static EnvClusterInfo fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EnvClusterInfo.class); - } - - /** - * Convert an instance of EnvClusterInfo to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ItemChangeSets.java b/java-client/src/main/java/org/openapitools/client/model/ItemChangeSets.java deleted file mode 100644 index 28aee31..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/ItemChangeSets.java +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ItemDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ItemChangeSets - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemChangeSets { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_CREATE_ITEMS = "createItems"; - @SerializedName(SERIALIZED_NAME_CREATE_ITEMS) - @javax.annotation.Nullable - private List createItems = new ArrayList<>(); - - public static final String SERIALIZED_NAME_UPDATE_ITEMS = "updateItems"; - @SerializedName(SERIALIZED_NAME_UPDATE_ITEMS) - @javax.annotation.Nullable - private List updateItems = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DELETE_ITEMS = "deleteItems"; - @SerializedName(SERIALIZED_NAME_DELETE_ITEMS) - @javax.annotation.Nullable - private List deleteItems = new ArrayList<>(); - - public ItemChangeSets() { - } - - public ItemChangeSets dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ItemChangeSets dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ItemChangeSets dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ItemChangeSets dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ItemChangeSets dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ItemChangeSets dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ItemChangeSets createItems(@javax.annotation.Nullable List createItems) { - this.createItems = createItems; - return this; - } - - public ItemChangeSets addCreateItemsItem(ItemDTO createItemsItem) { - if (this.createItems == null) { - this.createItems = new ArrayList<>(); - } - this.createItems.add(createItemsItem); - return this; - } - - /** - * - * @return createItems - */ - @javax.annotation.Nullable - public List getCreateItems() { - return createItems; - } - - public void setCreateItems(@javax.annotation.Nullable List createItems) { - this.createItems = createItems; - } - - - public ItemChangeSets updateItems(@javax.annotation.Nullable List updateItems) { - this.updateItems = updateItems; - return this; - } - - public ItemChangeSets addUpdateItemsItem(ItemDTO updateItemsItem) { - if (this.updateItems == null) { - this.updateItems = new ArrayList<>(); - } - this.updateItems.add(updateItemsItem); - return this; - } - - /** - * - * @return updateItems - */ - @javax.annotation.Nullable - public List getUpdateItems() { - return updateItems; - } - - public void setUpdateItems(@javax.annotation.Nullable List updateItems) { - this.updateItems = updateItems; - } - - - public ItemChangeSets deleteItems(@javax.annotation.Nullable List deleteItems) { - this.deleteItems = deleteItems; - return this; - } - - public ItemChangeSets addDeleteItemsItem(ItemDTO deleteItemsItem) { - if (this.deleteItems == null) { - this.deleteItems = new ArrayList<>(); - } - this.deleteItems.add(deleteItemsItem); - return this; - } - - /** - * - * @return deleteItems - */ - @javax.annotation.Nullable - public List getDeleteItems() { - return deleteItems; - } - - public void setDeleteItems(@javax.annotation.Nullable List deleteItems) { - this.deleteItems = deleteItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ItemChangeSets itemChangeSets = (ItemChangeSets) o; - return Objects.equals(this.dataChangeCreatedBy, itemChangeSets.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemChangeSets.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemChangeSets.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemChangeSets.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemChangeSets.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemChangeSets.dataChangeLastModifiedTime) && - Objects.equals(this.createItems, itemChangeSets.createItems) && - Objects.equals(this.updateItems, itemChangeSets.updateItems) && - Objects.equals(this.deleteItems, itemChangeSets.deleteItems); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, createItems, updateItems, deleteItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ItemChangeSets {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); - sb.append(" updateItems: ").append(toIndentedString(updateItems)).append("\n"); - sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ItemChangeSets - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ItemChangeSets.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ItemChangeSets is not found in the empty JSON string", ItemChangeSets.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ItemChangeSets.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ItemChangeSets` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if (jsonObj.get("createItems") != null && !jsonObj.get("createItems").isJsonNull()) { - JsonArray jsonArraycreateItems = jsonObj.getAsJsonArray("createItems"); - if (jsonArraycreateItems != null) { - // ensure the json data is an array - if (!jsonObj.get("createItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `createItems` to be an array in the JSON string but got `%s`", jsonObj.get("createItems").toString())); - } - - // validate the optional field `createItems` (array) - for (int i = 0; i < jsonArraycreateItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArraycreateItems.get(i)); - }; - } - } - if (jsonObj.get("updateItems") != null && !jsonObj.get("updateItems").isJsonNull()) { - JsonArray jsonArrayupdateItems = jsonObj.getAsJsonArray("updateItems"); - if (jsonArrayupdateItems != null) { - // ensure the json data is an array - if (!jsonObj.get("updateItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `updateItems` to be an array in the JSON string but got `%s`", jsonObj.get("updateItems").toString())); - } - - // validate the optional field `updateItems` (array) - for (int i = 0; i < jsonArrayupdateItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArrayupdateItems.get(i)); - }; - } - } - if (jsonObj.get("deleteItems") != null && !jsonObj.get("deleteItems").isJsonNull()) { - JsonArray jsonArraydeleteItems = jsonObj.getAsJsonArray("deleteItems"); - if (jsonArraydeleteItems != null) { - // ensure the json data is an array - if (!jsonObj.get("deleteItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deleteItems` to be an array in the JSON string but got `%s`", jsonObj.get("deleteItems").toString())); - } - - // validate the optional field `deleteItems` (array) - for (int i = 0; i < jsonArraydeleteItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArraydeleteItems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ItemChangeSets.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ItemChangeSets' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ItemChangeSets.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ItemChangeSets value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ItemChangeSets read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ItemChangeSets given an JSON string - * - * @param jsonString JSON string - * @return An instance of ItemChangeSets - * @throws IOException if the JSON string is invalid with respect to ItemChangeSets - */ - public static ItemChangeSets fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ItemChangeSets.class); - } - - /** - * Convert an instance of ItemChangeSets to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/ItemDTO.java deleted file mode 100644 index 3014c56..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/ItemDTO.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ItemDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) - @javax.annotation.Nullable - private Long namespaceId; - - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private Integer type; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_LINE_NUM = "lineNum"; - @SerializedName(SERIALIZED_NAME_LINE_NUM) - @javax.annotation.Nullable - private Integer lineNum; - - public ItemDTO() { - } - - public ItemDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ItemDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ItemDTO dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ItemDTO dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ItemDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ItemDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ItemDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public ItemDTO namespaceId(@javax.annotation.Nullable Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * - * @return namespaceId - */ - @javax.annotation.Nullable - public Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(@javax.annotation.Nullable Long namespaceId) { - this.namespaceId = namespaceId; - } - - - public ItemDTO key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - - public ItemDTO type(@javax.annotation.Nullable Integer type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - @javax.annotation.Nullable - public Integer getType() { - return type; - } - - public void setType(@javax.annotation.Nullable Integer type) { - this.type = type; - } - - - public ItemDTO value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - - public ItemDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - public ItemDTO lineNum(@javax.annotation.Nullable Integer lineNum) { - this.lineNum = lineNum; - return this; - } - - /** - * - * @return lineNum - */ - @javax.annotation.Nullable - public Integer getLineNum() { - return lineNum; - } - - public void setLineNum(@javax.annotation.Nullable Integer lineNum) { - this.lineNum = lineNum; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ItemDTO itemDTO = (ItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, itemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, itemDTO.id) && - Objects.equals(this.namespaceId, itemDTO.namespaceId) && - Objects.equals(this.key, itemDTO.key) && - Objects.equals(this.type, itemDTO.type) && - Objects.equals(this.value, itemDTO.value) && - Objects.equals(this.comment, itemDTO.comment) && - Objects.equals(this.lineNum, itemDTO.lineNum); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, namespaceId, key, type, value, comment, lineNum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ItemDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" lineNum: ").append(toIndentedString(lineNum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "namespaceId", "key", "type", "value", "comment", "lineNum")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ItemDTO is not found in the empty JSON string", ItemDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ItemDTO - * @throws IOException if the JSON string is invalid with respect to ItemDTO - */ - public static ItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ItemDTO.class); - } - - /** - * Convert an instance of ItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/KVEntity.java b/java-client/src/main/java/org/openapitools/client/model/KVEntity.java deleted file mode 100644 index bebc0fa..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/KVEntity.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * KVEntity - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class KVEntity { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public KVEntity() { - } - - public KVEntity key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - - public KVEntity value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - KVEntity kvEntity = (KVEntity) o; - return Objects.equals(this.key, kvEntity.key) && - Objects.equals(this.value, kvEntity.value); - } - - @Override - public int hashCode() { - return Objects.hash(key, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class KVEntity {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("key", "value")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to KVEntity - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!KVEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in KVEntity is not found in the empty JSON string", KVEntity.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!KVEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `KVEntity` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!KVEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'KVEntity' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(KVEntity.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, KVEntity value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public KVEntity read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of KVEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of KVEntity - * @throws IOException if the JSON string is invalid with respect to KVEntity - */ - public static KVEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, KVEntity.class); - } - - /** - * Convert an instance of KVEntity to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ListItemDiffs.java b/java-client/src/main/java/org/openapitools/client/model/ListItemDiffs.java deleted file mode 100644 index 6f8842e..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/ListItemDiffs.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ItemChangeSets; -import org.openapitools.client.model.NamespaceIdentifier; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ListItemDiffs - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListItemDiffs { - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - @javax.annotation.Nullable - private NamespaceIdentifier namespace; - - public static final String SERIALIZED_NAME_DIFFS = "diffs"; - @SerializedName(SERIALIZED_NAME_DIFFS) - @javax.annotation.Nullable - private ItemChangeSets diffs; - - public static final String SERIALIZED_NAME_EXT_INFO = "extInfo"; - @SerializedName(SERIALIZED_NAME_EXT_INFO) - @javax.annotation.Nullable - private String extInfo; - - public ListItemDiffs() { - } - - public ListItemDiffs namespace(@javax.annotation.Nullable NamespaceIdentifier namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get namespace - * @return namespace - */ - @javax.annotation.Nullable - public NamespaceIdentifier getNamespace() { - return namespace; - } - - public void setNamespace(@javax.annotation.Nullable NamespaceIdentifier namespace) { - this.namespace = namespace; - } - - - public ListItemDiffs diffs(@javax.annotation.Nullable ItemChangeSets diffs) { - this.diffs = diffs; - return this; - } - - /** - * Get diffs - * @return diffs - */ - @javax.annotation.Nullable - public ItemChangeSets getDiffs() { - return diffs; - } - - public void setDiffs(@javax.annotation.Nullable ItemChangeSets diffs) { - this.diffs = diffs; - } - - - public ListItemDiffs extInfo(@javax.annotation.Nullable String extInfo) { - this.extInfo = extInfo; - return this; - } - - /** - * - * @return extInfo - */ - @javax.annotation.Nullable - public String getExtInfo() { - return extInfo; - } - - public void setExtInfo(@javax.annotation.Nullable String extInfo) { - this.extInfo = extInfo; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListItemDiffs listItemDiffs = (ListItemDiffs) o; - return Objects.equals(this.namespace, listItemDiffs.namespace) && - Objects.equals(this.diffs, listItemDiffs.diffs) && - Objects.equals(this.extInfo, listItemDiffs.extInfo); - } - - @Override - public int hashCode() { - return Objects.hash(namespace, diffs, extInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListItemDiffs {\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" diffs: ").append(toIndentedString(diffs)).append("\n"); - sb.append(" extInfo: ").append(toIndentedString(extInfo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("namespace", "diffs", "extInfo")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ListItemDiffs - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ListItemDiffs.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListItemDiffs is not found in the empty JSON string", ListItemDiffs.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ListItemDiffs.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListItemDiffs` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `namespace` - if (jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) { - NamespaceIdentifier.validateJsonElement(jsonObj.get("namespace")); - } - // validate the optional field `diffs` - if (jsonObj.get("diffs") != null && !jsonObj.get("diffs").isJsonNull()) { - ItemChangeSets.validateJsonElement(jsonObj.get("diffs")); - } - if ((jsonObj.get("extInfo") != null && !jsonObj.get("extInfo").isJsonNull()) && !jsonObj.get("extInfo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `extInfo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("extInfo").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListItemDiffs.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListItemDiffs' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ListItemDiffs.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ListItemDiffs value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListItemDiffs read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ListItemDiffs given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListItemDiffs - * @throws IOException if the JSON string is invalid with respect to ListItemDiffs - */ - public static ListItemDiffs fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListItemDiffs.class); - } - - /** - * Convert an instance of ListItemDiffs to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ListReleaseBO.java b/java-client/src/main/java/org/openapitools/client/model/ListReleaseBO.java deleted file mode 100644 index 9234f38..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/ListReleaseBO.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.KVEntity; -import org.openapitools.client.model.ReleaseDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ListReleaseBO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListReleaseBO { - public static final String SERIALIZED_NAME_BASE_INFO = "baseInfo"; - @SerializedName(SERIALIZED_NAME_BASE_INFO) - @javax.annotation.Nullable - private ReleaseDTO baseInfo; - - public static final String SERIALIZED_NAME_ITEMS = "items"; - @SerializedName(SERIALIZED_NAME_ITEMS) - @javax.annotation.Nullable - private List items = new ArrayList<>(); - - public ListReleaseBO() { - } - - public ListReleaseBO baseInfo(@javax.annotation.Nullable ReleaseDTO baseInfo) { - this.baseInfo = baseInfo; - return this; - } - - /** - * Get baseInfo - * @return baseInfo - */ - @javax.annotation.Nullable - public ReleaseDTO getBaseInfo() { - return baseInfo; - } - - public void setBaseInfo(@javax.annotation.Nullable ReleaseDTO baseInfo) { - this.baseInfo = baseInfo; - } - - - public ListReleaseBO items(@javax.annotation.Nullable List items) { - this.items = items; - return this; - } - - public ListReleaseBO addItemsItem(KVEntity itemsItem) { - if (this.items == null) { - this.items = new ArrayList<>(); - } - this.items.add(itemsItem); - return this; - } - - /** - * - * @return items - */ - @javax.annotation.Nullable - public List getItems() { - return items; - } - - public void setItems(@javax.annotation.Nullable List items) { - this.items = items; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ListReleaseBO listReleaseBO = (ListReleaseBO) o; - return Objects.equals(this.baseInfo, listReleaseBO.baseInfo) && - Objects.equals(this.items, listReleaseBO.items); - } - - @Override - public int hashCode() { - return Objects.hash(baseInfo, items); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ListReleaseBO {\n"); - sb.append(" baseInfo: ").append(toIndentedString(baseInfo)).append("\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("baseInfo", "items")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ListReleaseBO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ListReleaseBO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListReleaseBO is not found in the empty JSON string", ListReleaseBO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ListReleaseBO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ListReleaseBO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `baseInfo` - if (jsonObj.get("baseInfo") != null && !jsonObj.get("baseInfo").isJsonNull()) { - ReleaseDTO.validateJsonElement(jsonObj.get("baseInfo")); - } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - KVEntity.validateJsonElement(jsonArrayitems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ListReleaseBO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ListReleaseBO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ListReleaseBO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ListReleaseBO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ListReleaseBO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ListReleaseBO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ListReleaseBO - * @throws IOException if the JSON string is invalid with respect to ListReleaseBO - */ - public static ListReleaseBO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ListReleaseBO.class); - } - - /** - * Convert an instance of ListReleaseBO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/MapString.java b/java-client/src/main/java/org/openapitools/client/model/MapString.java deleted file mode 100644 index eabeaf9..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/MapString.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 字符串映射对象,用于表示键值对的配置数据结构 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class MapString { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public MapString() { - } - - public MapString key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * Get key - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapString mapString = (MapString) o; - return Objects.equals(this.key, mapString.key); - } - - @Override - public int hashCode() { - return Objects.hash(key); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapString {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("key")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to MapString - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!MapString.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MapString is not found in the empty JSON string", MapString.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!MapString.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MapString` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!MapString.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MapString' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MapString.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, MapString value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public MapString read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of MapString given an JSON string - * - * @param jsonString JSON string - * @return An instance of MapString - * @throws IOException if the JSON string is invalid with respect to MapString - */ - public static MapString fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MapString.class); - } - - /** - * Convert an instance of MapString to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java deleted file mode 100644 index 27a2b2f..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceGrayDelReleaseDTO { - public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; - @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) - @javax.annotation.Nullable - private String releaseTitle; - - public static final String SERIALIZED_NAME_RELEASE_COMMENT = "releaseComment"; - @SerializedName(SERIALIZED_NAME_RELEASE_COMMENT) - @javax.annotation.Nullable - private String releaseComment; - - public static final String SERIALIZED_NAME_RELEASED_BY = "releasedBy"; - @SerializedName(SERIALIZED_NAME_RELEASED_BY) - @javax.annotation.Nullable - private String releasedBy; - - public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH = "isEmergencyPublish"; - @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH) - @javax.annotation.Nullable - private Boolean isEmergencyPublish; - - public static final String SERIALIZED_NAME_GRAY_DEL_KEYS = "grayDelKeys"; - @SerializedName(SERIALIZED_NAME_GRAY_DEL_KEYS) - @javax.annotation.Nullable - private List grayDelKeys = new ArrayList<>(); - - public NamespaceGrayDelReleaseDTO() { - } - - public NamespaceGrayDelReleaseDTO releaseTitle(@javax.annotation.Nullable String releaseTitle) { - this.releaseTitle = releaseTitle; - return this; - } - - /** - * 发布标题,用于标识这次灰度删除发布的名称或版本号 - * @return releaseTitle - */ - @javax.annotation.Nullable - public String getReleaseTitle() { - return releaseTitle; - } - - public void setReleaseTitle(@javax.annotation.Nullable String releaseTitle) { - this.releaseTitle = releaseTitle; - } - - - public NamespaceGrayDelReleaseDTO releaseComment(@javax.annotation.Nullable String releaseComment) { - this.releaseComment = releaseComment; - return this; - } - - /** - * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - * @return releaseComment - */ - @javax.annotation.Nullable - public String getReleaseComment() { - return releaseComment; - } - - public void setReleaseComment(@javax.annotation.Nullable String releaseComment) { - this.releaseComment = releaseComment; - } - - - public NamespaceGrayDelReleaseDTO releasedBy(@javax.annotation.Nullable String releasedBy) { - this.releasedBy = releasedBy; - return this; - } - - /** - * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - * @return releasedBy - */ - @javax.annotation.Nullable - public String getReleasedBy() { - return releasedBy; - } - - public void setReleasedBy(@javax.annotation.Nullable String releasedBy) { - this.releasedBy = releasedBy; - } - - - public NamespaceGrayDelReleaseDTO isEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - return this; - } - - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @return isEmergencyPublish - */ - @javax.annotation.Nullable - public Boolean getIsEmergencyPublish() { - return isEmergencyPublish; - } - - public void setIsEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - } - - - public NamespaceGrayDelReleaseDTO grayDelKeys(@javax.annotation.Nullable List grayDelKeys) { - this.grayDelKeys = grayDelKeys; - return this; - } - - public NamespaceGrayDelReleaseDTO addGrayDelKeysItem(String grayDelKeysItem) { - if (this.grayDelKeys == null) { - this.grayDelKeys = new ArrayList<>(); - } - this.grayDelKeys.add(grayDelKeysItem); - return this; - } - - /** - * 需要在灰度发布中删除的配置项键名列表 - * @return grayDelKeys - */ - @javax.annotation.Nullable - public List getGrayDelKeys() { - return grayDelKeys; - } - - public void setGrayDelKeys(@javax.annotation.Nullable List grayDelKeys) { - this.grayDelKeys = grayDelKeys; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = (NamespaceGrayDelReleaseDTO) o; - return Objects.equals(this.releaseTitle, namespaceGrayDelReleaseDTO.releaseTitle) && - Objects.equals(this.releaseComment, namespaceGrayDelReleaseDTO.releaseComment) && - Objects.equals(this.releasedBy, namespaceGrayDelReleaseDTO.releasedBy) && - Objects.equals(this.isEmergencyPublish, namespaceGrayDelReleaseDTO.isEmergencyPublish) && - Objects.equals(this.grayDelKeys, namespaceGrayDelReleaseDTO.grayDelKeys); - } - - @Override - public int hashCode() { - return Objects.hash(releaseTitle, releaseComment, releasedBy, isEmergencyPublish, grayDelKeys); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceGrayDelReleaseDTO {\n"); - sb.append(" releaseTitle: ").append(toIndentedString(releaseTitle)).append("\n"); - sb.append(" releaseComment: ").append(toIndentedString(releaseComment)).append("\n"); - sb.append(" releasedBy: ").append(toIndentedString(releasedBy)).append("\n"); - sb.append(" isEmergencyPublish: ").append(toIndentedString(isEmergencyPublish)).append("\n"); - sb.append(" grayDelKeys: ").append(toIndentedString(grayDelKeys)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceGrayDelReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceGrayDelReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceGrayDelReleaseDTO is not found in the empty JSON string", NamespaceGrayDelReleaseDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceGrayDelReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceGrayDelReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("releaseTitle") != null && !jsonObj.get("releaseTitle").isJsonNull()) && !jsonObj.get("releaseTitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseTitle").toString())); - } - if ((jsonObj.get("releaseComment") != null && !jsonObj.get("releaseComment").isJsonNull()) && !jsonObj.get("releaseComment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseComment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseComment").toString())); - } - if ((jsonObj.get("releasedBy") != null && !jsonObj.get("releasedBy").isJsonNull()) && !jsonObj.get("releasedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releasedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releasedBy").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("grayDelKeys") != null && !jsonObj.get("grayDelKeys").isJsonNull() && !jsonObj.get("grayDelKeys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `grayDelKeys` to be an array in the JSON string but got `%s`", jsonObj.get("grayDelKeys").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceGrayDelReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceGrayDelReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceGrayDelReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceGrayDelReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceGrayDelReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NamespaceGrayDelReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceGrayDelReleaseDTO - * @throws IOException if the JSON string is invalid with respect to NamespaceGrayDelReleaseDTO - */ - public static NamespaceGrayDelReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceGrayDelReleaseDTO.class); - } - - /** - * Convert an instance of NamespaceGrayDelReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceIdentifier.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceIdentifier.java deleted file mode 100644 index 3be6832..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceIdentifier.java +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * NamespaceIdentifier - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceIdentifier { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable - private String env; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public NamespaceIdentifier() { - } - - public NamespaceIdentifier appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public NamespaceIdentifier env(@javax.annotation.Nullable String env) { - this.env = env; - return this; - } - - /** - * - * @return env - */ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - public void setEnv(@javax.annotation.Nullable String env) { - this.env = env; - } - - - public NamespaceIdentifier clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public NamespaceIdentifier namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceIdentifier namespaceIdentifier = (NamespaceIdentifier) o; - return Objects.equals(this.appId, namespaceIdentifier.appId) && - Objects.equals(this.env, namespaceIdentifier.env) && - Objects.equals(this.clusterName, namespaceIdentifier.clusterName) && - Objects.equals(this.namespaceName, namespaceIdentifier.namespaceName); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, clusterName, namespaceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceIdentifier {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("appId", "env", "clusterName", "namespaceName")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceIdentifier - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceIdentifier.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceIdentifier is not found in the empty JSON string", NamespaceIdentifier.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceIdentifier.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceIdentifier` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceIdentifier.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceIdentifier' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceIdentifier.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceIdentifier value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceIdentifier read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NamespaceIdentifier given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceIdentifier - * @throws IOException if the JSON string is invalid with respect to NamespaceIdentifier - */ - public static NamespaceIdentifier fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceIdentifier.class); - } - - /** - * Convert an instance of NamespaceIdentifier to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java deleted file mode 100644 index 96cb05e..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 命名空间发布请求数据传输对象,用于创建新的配置发布 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceReleaseDTO { - public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; - @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) - @javax.annotation.Nullable - private String releaseTitle; - - public static final String SERIALIZED_NAME_RELEASE_COMMENT = "releaseComment"; - @SerializedName(SERIALIZED_NAME_RELEASE_COMMENT) - @javax.annotation.Nullable - private String releaseComment; - - public static final String SERIALIZED_NAME_RELEASED_BY = "releasedBy"; - @SerializedName(SERIALIZED_NAME_RELEASED_BY) - @javax.annotation.Nullable - private String releasedBy; - - public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH = "isEmergencyPublish"; - @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH) - @javax.annotation.Nullable - private Boolean isEmergencyPublish; - - public NamespaceReleaseDTO() { - } - - public NamespaceReleaseDTO releaseTitle(@javax.annotation.Nullable String releaseTitle) { - this.releaseTitle = releaseTitle; - return this; - } - - /** - * 发布标题,用于标识这次发布的名称或版本号 - * @return releaseTitle - */ - @javax.annotation.Nullable - public String getReleaseTitle() { - return releaseTitle; - } - - public void setReleaseTitle(@javax.annotation.Nullable String releaseTitle) { - this.releaseTitle = releaseTitle; - } - - - public NamespaceReleaseDTO releaseComment(@javax.annotation.Nullable String releaseComment) { - this.releaseComment = releaseComment; - return this; - } - - /** - * 发布备注,详细描述本次发布的变更内容和目的 - * @return releaseComment - */ - @javax.annotation.Nullable - public String getReleaseComment() { - return releaseComment; - } - - public void setReleaseComment(@javax.annotation.Nullable String releaseComment) { - this.releaseComment = releaseComment; - } - - - public NamespaceReleaseDTO releasedBy(@javax.annotation.Nullable String releasedBy) { - this.releasedBy = releasedBy; - return this; - } - - /** - * 发布操作者用户名,记录是谁执行了这次发布操作 - * @return releasedBy - */ - @javax.annotation.Nullable - public String getReleasedBy() { - return releasedBy; - } - - public void setReleasedBy(@javax.annotation.Nullable String releasedBy) { - this.releasedBy = releasedBy; - } - - - public NamespaceReleaseDTO isEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - return this; - } - - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @return isEmergencyPublish - */ - @javax.annotation.Nullable - public Boolean getIsEmergencyPublish() { - return isEmergencyPublish; - } - - public void setIsEmergencyPublish(@javax.annotation.Nullable Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceReleaseDTO namespaceReleaseDTO = (NamespaceReleaseDTO) o; - return Objects.equals(this.releaseTitle, namespaceReleaseDTO.releaseTitle) && - Objects.equals(this.releaseComment, namespaceReleaseDTO.releaseComment) && - Objects.equals(this.releasedBy, namespaceReleaseDTO.releasedBy) && - Objects.equals(this.isEmergencyPublish, namespaceReleaseDTO.isEmergencyPublish); - } - - @Override - public int hashCode() { - return Objects.hash(releaseTitle, releaseComment, releasedBy, isEmergencyPublish); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceReleaseDTO {\n"); - sb.append(" releaseTitle: ").append(toIndentedString(releaseTitle)).append("\n"); - sb.append(" releaseComment: ").append(toIndentedString(releaseComment)).append("\n"); - sb.append(" releasedBy: ").append(toIndentedString(releasedBy)).append("\n"); - sb.append(" isEmergencyPublish: ").append(toIndentedString(isEmergencyPublish)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceReleaseDTO is not found in the empty JSON string", NamespaceReleaseDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("releaseTitle") != null && !jsonObj.get("releaseTitle").isJsonNull()) && !jsonObj.get("releaseTitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseTitle").toString())); - } - if ((jsonObj.get("releaseComment") != null && !jsonObj.get("releaseComment").isJsonNull()) && !jsonObj.get("releaseComment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseComment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseComment").toString())); - } - if ((jsonObj.get("releasedBy") != null && !jsonObj.get("releasedBy").isJsonNull()) && !jsonObj.get("releasedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releasedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releasedBy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NamespaceReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceReleaseDTO - * @throws IOException if the JSON string is invalid with respect to NamespaceReleaseDTO - */ - public static NamespaceReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceReleaseDTO.class); - } - - /** - * Convert an instance of NamespaceReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceSyncModel.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceSyncModel.java deleted file mode 100644 index 1325513..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceSyncModel.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ItemDTO; -import org.openapitools.client.model.NamespaceIdentifier; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * NamespaceSyncModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceSyncModel { - public static final String SERIALIZED_NAME_SYNC_TO_NAMESPACES = "syncToNamespaces"; - @SerializedName(SERIALIZED_NAME_SYNC_TO_NAMESPACES) - @javax.annotation.Nullable - private List syncToNamespaces = new ArrayList<>(); - - public static final String SERIALIZED_NAME_SYNC_ITEMS = "syncItems"; - @SerializedName(SERIALIZED_NAME_SYNC_ITEMS) - @javax.annotation.Nullable - private List syncItems = new ArrayList<>(); - - public NamespaceSyncModel() { - } - - public NamespaceSyncModel syncToNamespaces(@javax.annotation.Nullable List syncToNamespaces) { - this.syncToNamespaces = syncToNamespaces; - return this; - } - - public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToNamespacesItem) { - if (this.syncToNamespaces == null) { - this.syncToNamespaces = new ArrayList<>(); - } - this.syncToNamespaces.add(syncToNamespacesItem); - return this; - } - - /** - * - * @return syncToNamespaces - */ - @javax.annotation.Nullable - public List getSyncToNamespaces() { - return syncToNamespaces; - } - - public void setSyncToNamespaces(@javax.annotation.Nullable List syncToNamespaces) { - this.syncToNamespaces = syncToNamespaces; - } - - - public NamespaceSyncModel syncItems(@javax.annotation.Nullable List syncItems) { - this.syncItems = syncItems; - return this; - } - - public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { - if (this.syncItems == null) { - this.syncItems = new ArrayList<>(); - } - this.syncItems.add(syncItemsItem); - return this; - } - - /** - * - * @return syncItems - */ - @javax.annotation.Nullable - public List getSyncItems() { - return syncItems; - } - - public void setSyncItems(@javax.annotation.Nullable List syncItems) { - this.syncItems = syncItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceSyncModel namespaceSyncModel = (NamespaceSyncModel) o; - return Objects.equals(this.syncToNamespaces, namespaceSyncModel.syncToNamespaces) && - Objects.equals(this.syncItems, namespaceSyncModel.syncItems); - } - - @Override - public int hashCode() { - return Objects.hash(syncToNamespaces, syncItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceSyncModel {\n"); - sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); - sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("syncToNamespaces", "syncItems")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceSyncModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceSyncModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceSyncModel is not found in the empty JSON string", NamespaceSyncModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceSyncModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceSyncModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("syncToNamespaces") != null && !jsonObj.get("syncToNamespaces").isJsonNull()) { - JsonArray jsonArraysyncToNamespaces = jsonObj.getAsJsonArray("syncToNamespaces"); - if (jsonArraysyncToNamespaces != null) { - // ensure the json data is an array - if (!jsonObj.get("syncToNamespaces").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `syncToNamespaces` to be an array in the JSON string but got `%s`", jsonObj.get("syncToNamespaces").toString())); - } - - // validate the optional field `syncToNamespaces` (array) - for (int i = 0; i < jsonArraysyncToNamespaces.size(); i++) { - NamespaceIdentifier.validateJsonElement(jsonArraysyncToNamespaces.get(i)); - }; - } - } - if (jsonObj.get("syncItems") != null && !jsonObj.get("syncItems").isJsonNull()) { - JsonArray jsonArraysyncItems = jsonObj.getAsJsonArray("syncItems"); - if (jsonArraysyncItems != null) { - // ensure the json data is an array - if (!jsonObj.get("syncItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `syncItems` to be an array in the JSON string but got `%s`", jsonObj.get("syncItems").toString())); - } - - // validate the optional field `syncItems` (array) - for (int i = 0; i < jsonArraysyncItems.size(); i++) { - ItemDTO.validateJsonElement(jsonArraysyncItems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceSyncModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceSyncModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceSyncModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceSyncModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceSyncModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NamespaceSyncModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceSyncModel - * @throws IOException if the JSON string is invalid with respect to NamespaceSyncModel - */ - public static NamespaceSyncModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceSyncModel.class); - } - - /** - * Convert an instance of NamespaceSyncModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceTextModel.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceTextModel.java deleted file mode 100644 index 3bf24c1..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceTextModel.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * NamespaceTextModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceTextModel { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable - private String env; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) - @javax.annotation.Nullable - private Long namespaceId; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - @javax.annotation.Nullable - private String format; - - public static final String SERIALIZED_NAME_CONFIG_TEXT = "configText"; - @SerializedName(SERIALIZED_NAME_CONFIG_TEXT) - @javax.annotation.Nullable - private String configText; - - public static final String SERIALIZED_NAME_OPERATOR = "operator"; - @SerializedName(SERIALIZED_NAME_OPERATOR) - @javax.annotation.Nullable - private String operator; - - public NamespaceTextModel() { - } - - public NamespaceTextModel appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public NamespaceTextModel env(@javax.annotation.Nullable String env) { - this.env = env; - return this; - } - - /** - * - * @return env - */ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - public void setEnv(@javax.annotation.Nullable String env) { - this.env = env; - } - - - public NamespaceTextModel clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public NamespaceTextModel namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public NamespaceTextModel namespaceId(@javax.annotation.Nullable Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * - * @return namespaceId - */ - @javax.annotation.Nullable - public Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(@javax.annotation.Nullable Long namespaceId) { - this.namespaceId = namespaceId; - } - - - public NamespaceTextModel format(@javax.annotation.Nullable String format) { - this.format = format; - return this; - } - - /** - * - * @return format - */ - @javax.annotation.Nullable - public String getFormat() { - return format; - } - - public void setFormat(@javax.annotation.Nullable String format) { - this.format = format; - } - - - public NamespaceTextModel configText(@javax.annotation.Nullable String configText) { - this.configText = configText; - return this; - } - - /** - * - * @return configText - */ - @javax.annotation.Nullable - public String getConfigText() { - return configText; - } - - public void setConfigText(@javax.annotation.Nullable String configText) { - this.configText = configText; - } - - - public NamespaceTextModel operator(@javax.annotation.Nullable String operator) { - this.operator = operator; - return this; - } - - /** - * - * @return operator - */ - @javax.annotation.Nullable - public String getOperator() { - return operator; - } - - public void setOperator(@javax.annotation.Nullable String operator) { - this.operator = operator; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceTextModel namespaceTextModel = (NamespaceTextModel) o; - return Objects.equals(this.appId, namespaceTextModel.appId) && - Objects.equals(this.env, namespaceTextModel.env) && - Objects.equals(this.clusterName, namespaceTextModel.clusterName) && - Objects.equals(this.namespaceName, namespaceTextModel.namespaceName) && - Objects.equals(this.namespaceId, namespaceTextModel.namespaceId) && - Objects.equals(this.format, namespaceTextModel.format) && - Objects.equals(this.configText, namespaceTextModel.configText) && - Objects.equals(this.operator, namespaceTextModel.operator); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, clusterName, namespaceName, namespaceId, format, configText, operator); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceTextModel {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" configText: ").append(toIndentedString(configText)).append("\n"); - sb.append(" operator: ").append(toIndentedString(operator)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to NamespaceTextModel - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!NamespaceTextModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in NamespaceTextModel is not found in the empty JSON string", NamespaceTextModel.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!NamespaceTextModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NamespaceTextModel` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if ((jsonObj.get("configText") != null && !jsonObj.get("configText").isJsonNull()) && !jsonObj.get("configText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `configText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configText").toString())); - } - if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceTextModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceTextModel' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceTextModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceTextModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceTextModel read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of NamespaceTextModel given an JSON string - * - * @param jsonString JSON string - * @return An instance of NamespaceTextModel - * @throws IOException if the JSON string is invalid with respect to NamespaceTextModel - */ - public static NamespaceTextModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceTextModel.class); - } - - /** - * Convert an instance of NamespaceTextModel to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java deleted file mode 100644 index 94166db..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenAppDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_ORG_ID = "orgId"; - @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable - private String orgId; - - public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; - @SerializedName(SERIALIZED_NAME_ORG_NAME) - @javax.annotation.Nullable - private String orgName; - - public static final String SERIALIZED_NAME_OWNER_NAME = "ownerName"; - @SerializedName(SERIALIZED_NAME_OWNER_NAME) - @javax.annotation.Nullable - private String ownerName; - - public static final String SERIALIZED_NAME_OWNER_EMAIL = "ownerEmail"; - @SerializedName(SERIALIZED_NAME_OWNER_EMAIL) - @javax.annotation.Nullable - private String ownerEmail; - - public OpenAppDTO() { - } - - public OpenAppDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 数据创建者用户名,记录是谁创建了这个应用 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenAppDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 数据最后修改者用户名,记录最后一次修改应用信息的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenAppDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 数据创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenAppDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 数据最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenAppDTO name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * 应用名称,用于显示的友好名称 - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - - public OpenAppDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * 应用唯一标识符,全局唯一的应用ID - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public OpenAppDTO orgId(@javax.annotation.Nullable String orgId) { - this.orgId = orgId; - return this; - } - - /** - * 组织ID,应用所属组织的唯一标识 - * @return orgId - */ - @javax.annotation.Nullable - public String getOrgId() { - return orgId; - } - - public void setOrgId(@javax.annotation.Nullable String orgId) { - this.orgId = orgId; - } - - - public OpenAppDTO orgName(@javax.annotation.Nullable String orgName) { - this.orgName = orgName; - return this; - } - - /** - * 组织名称,应用所属组织的显示名称 - * @return orgName - */ - @javax.annotation.Nullable - public String getOrgName() { - return orgName; - } - - public void setOrgName(@javax.annotation.Nullable String orgName) { - this.orgName = orgName; - } - - - public OpenAppDTO ownerName(@javax.annotation.Nullable String ownerName) { - this.ownerName = ownerName; - return this; - } - - /** - * 应用负责人姓名,应用的主要负责人 - * @return ownerName - */ - @javax.annotation.Nullable - public String getOwnerName() { - return ownerName; - } - - public void setOwnerName(@javax.annotation.Nullable String ownerName) { - this.ownerName = ownerName; - } - - - public OpenAppDTO ownerEmail(@javax.annotation.Nullable String ownerEmail) { - this.ownerEmail = ownerEmail; - return this; - } - - /** - * 应用负责人邮箱地址,用于接收应用相关通知 - * @return ownerEmail - */ - @javax.annotation.Nullable - public String getOwnerEmail() { - return ownerEmail; - } - - public void setOwnerEmail(@javax.annotation.Nullable String ownerEmail) { - this.ownerEmail = ownerEmail; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppDTO openAppDTO = (OpenAppDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAppDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openAppDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openAppDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAppDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openAppDTO.name) && - Objects.equals(this.appId, openAppDTO.appId) && - Objects.equals(this.orgId, openAppDTO.orgId) && - Objects.equals(this.orgName, openAppDTO.orgName) && - Objects.equals(this.ownerName, openAppDTO.ownerName) && - Objects.equals(this.ownerEmail, openAppDTO.ownerEmail); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); - sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); - sb.append(" ownerEmail: ").append(toIndentedString(ownerEmail)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenAppDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenAppDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenAppDTO is not found in the empty JSON string", OpenAppDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenAppDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("orgId") != null && !jsonObj.get("orgId").isJsonNull()) && !jsonObj.get("orgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgId").toString())); - } - if ((jsonObj.get("orgName") != null && !jsonObj.get("orgName").isJsonNull()) && !jsonObj.get("orgName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgName").toString())); - } - if ((jsonObj.get("ownerName") != null && !jsonObj.get("ownerName").isJsonNull()) && !jsonObj.get("ownerName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerName").toString())); - } - if ((jsonObj.get("ownerEmail") != null && !jsonObj.get("ownerEmail").isJsonNull()) && !jsonObj.get("ownerEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerEmail").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenAppDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenAppDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenAppDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenAppDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenAppDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenAppDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenAppDTO - * @throws IOException if the JSON string is invalid with respect to OpenAppDTO - */ - public static OpenAppDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenAppDTO.class); - } - - /** - * Convert an instance of OpenAppDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java deleted file mode 100644 index 7d50f93..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenAppNamespaceDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - @javax.annotation.Nullable - private String format; - - public static final String SERIALIZED_NAME_IS_PUBLIC = "isPublic"; - @SerializedName(SERIALIZED_NAME_IS_PUBLIC) - @javax.annotation.Nullable - private Boolean isPublic; - - public static final String SERIALIZED_NAME_APPEND_NAMESPACE_PREFIX = "appendNamespacePrefix"; - @SerializedName(SERIALIZED_NAME_APPEND_NAMESPACE_PREFIX) - @javax.annotation.Nullable - private Boolean appendNamespacePrefix = true; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public OpenAppNamespaceDTO() { - } - - public OpenAppNamespaceDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenAppNamespaceDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenAppNamespaceDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 命名空间创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenAppNamespaceDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 命名空间最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenAppNamespaceDTO name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * 命名空间名称,在同一应用内唯一标识一个命名空间 - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - - public OpenAppNamespaceDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public OpenAppNamespaceDTO format(@javax.annotation.Nullable String format) { - this.format = format; - return this; - } - - /** - * 命名空间格式类型,如properties、xml、json、yml等 - * @return format - */ - @javax.annotation.Nullable - public String getFormat() { - return format; - } - - public void setFormat(@javax.annotation.Nullable String format) { - this.format = format; - } - - - public OpenAppNamespaceDTO isPublic(@javax.annotation.Nullable Boolean isPublic) { - this.isPublic = isPublic; - return this; - } - - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @return isPublic - */ - @javax.annotation.Nullable - public Boolean getIsPublic() { - return isPublic; - } - - public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { - this.isPublic = isPublic; - } - - - public OpenAppNamespaceDTO appendNamespacePrefix(@javax.annotation.Nullable Boolean appendNamespacePrefix) { - this.appendNamespacePrefix = appendNamespacePrefix; - return this; - } - - /** - * 对于公共命名空间,是否在命名空间名称前添加前缀 - * @return appendNamespacePrefix - */ - @javax.annotation.Nullable - public Boolean getAppendNamespacePrefix() { - return appendNamespacePrefix; - } - - public void setAppendNamespacePrefix(@javax.annotation.Nullable Boolean appendNamespacePrefix) { - this.appendNamespacePrefix = appendNamespacePrefix; - } - - - public OpenAppNamespaceDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * 命名空间备注说明,描述命名空间的用途和包含的配置类型 - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppNamespaceDTO openAppNamespaceDTO = (OpenAppNamespaceDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAppNamespaceDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openAppNamespaceDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openAppNamespaceDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAppNamespaceDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openAppNamespaceDTO.name) && - Objects.equals(this.appId, openAppNamespaceDTO.appId) && - Objects.equals(this.format, openAppNamespaceDTO.format) && - Objects.equals(this.isPublic, openAppNamespaceDTO.isPublic) && - Objects.equals(this.appendNamespacePrefix, openAppNamespaceDTO.appendNamespacePrefix) && - Objects.equals(this.comment, openAppNamespaceDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, format, isPublic, appendNamespacePrefix, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppNamespaceDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" appendNamespacePrefix: ").append(toIndentedString(appendNamespacePrefix)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenAppNamespaceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenAppNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenAppNamespaceDTO is not found in the empty JSON string", OpenAppNamespaceDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenAppNamespaceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenAppNamespaceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenAppNamespaceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenAppNamespaceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenAppNamespaceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenAppNamespaceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenAppNamespaceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenAppNamespaceDTO - * @throws IOException if the JSON string is invalid with respect to OpenAppNamespaceDTO - */ - public static OpenAppNamespaceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenAppNamespaceDTO.class); - } - - /** - * Convert an instance of OpenAppNamespaceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java deleted file mode 100644 index 0cce393..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java +++ /dev/null @@ -1,350 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenClusterDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public OpenClusterDTO() { - } - - public OpenClusterDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 集群创建者用户名,记录是谁创建了这个集群 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenClusterDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 集群最后修改者用户名,记录最后一次修改集群信息的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenClusterDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 集群创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenClusterDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 集群最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenClusterDTO name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * 集群名称,在同一应用和环境下唯一标识一个集群 - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - - public OpenClusterDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenClusterDTO openClusterDTO = (OpenClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openClusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openClusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openClusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openClusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openClusterDTO.name) && - Objects.equals(this.appId, openClusterDTO.appId); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenClusterDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenClusterDTO is not found in the empty JSON string", OpenClusterDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenClusterDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenClusterDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenClusterDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenClusterDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenClusterDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenClusterDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenClusterDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenClusterDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenClusterDTO - * @throws IOException if the JSON string is invalid with respect to OpenClusterDTO - */ - public static OpenClusterDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenClusterDTO.class); - } - - /** - * Convert an instance of OpenClusterDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java deleted file mode 100644 index 76e1229..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenAppDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenCreateAppDTO { - public static final String SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF = "assignAppRoleToSelf"; - @SerializedName(SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF) - @javax.annotation.Nullable - private Boolean assignAppRoleToSelf; - - public static final String SERIALIZED_NAME_ADMINS = "admins"; - @SerializedName(SERIALIZED_NAME_ADMINS) - @javax.annotation.Nullable - private List admins = new ArrayList<>(); - - public static final String SERIALIZED_NAME_APP = "app"; - @SerializedName(SERIALIZED_NAME_APP) - @javax.annotation.Nullable - private OpenAppDTO app; - - public OpenCreateAppDTO() { - } - - public OpenCreateAppDTO assignAppRoleToSelf(@javax.annotation.Nullable Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - return this; - } - - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @return assignAppRoleToSelf - */ - @javax.annotation.Nullable - public Boolean getAssignAppRoleToSelf() { - return assignAppRoleToSelf; - } - - public void setAssignAppRoleToSelf(@javax.annotation.Nullable Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - } - - - public OpenCreateAppDTO admins(@javax.annotation.Nullable List admins) { - this.admins = admins; - return this; - } - - public OpenCreateAppDTO addAdminsItem(String adminsItem) { - if (this.admins == null) { - this.admins = new ArrayList<>(); - } - this.admins.add(adminsItem); - return this; - } - - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @return admins - */ - @javax.annotation.Nullable - public List getAdmins() { - return admins; - } - - public void setAdmins(@javax.annotation.Nullable List admins) { - this.admins = admins; - } - - - public OpenCreateAppDTO app(@javax.annotation.Nullable OpenAppDTO app) { - this.app = app; - return this; - } - - /** - * Get app - * @return app - */ - @javax.annotation.Nullable - public OpenAppDTO getApp() { - return app; - } - - public void setApp(@javax.annotation.Nullable OpenAppDTO app) { - this.app = app; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenCreateAppDTO openCreateAppDTO = (OpenCreateAppDTO) o; - return Objects.equals(this.assignAppRoleToSelf, openCreateAppDTO.assignAppRoleToSelf) && - Objects.equals(this.admins, openCreateAppDTO.admins) && - Objects.equals(this.app, openCreateAppDTO.app); - } - - @Override - public int hashCode() { - return Objects.hash(assignAppRoleToSelf, admins, app); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenCreateAppDTO {\n"); - sb.append(" assignAppRoleToSelf: ").append(toIndentedString(assignAppRoleToSelf)).append("\n"); - sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); - sb.append(" app: ").append(toIndentedString(app)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("assignAppRoleToSelf", "admins", "app")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenCreateAppDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenCreateAppDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenCreateAppDTO is not found in the empty JSON string", OpenCreateAppDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenCreateAppDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenCreateAppDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // ensure the optional json data is an array if present - if (jsonObj.get("admins") != null && !jsonObj.get("admins").isJsonNull() && !jsonObj.get("admins").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `admins` to be an array in the JSON string but got `%s`", jsonObj.get("admins").toString())); - } - // validate the optional field `app` - if (jsonObj.get("app") != null && !jsonObj.get("app").isJsonNull()) { - OpenAppDTO.validateJsonElement(jsonObj.get("app")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenCreateAppDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenCreateAppDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenCreateAppDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenCreateAppDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenCreateAppDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenCreateAppDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenCreateAppDTO - * @throws IOException if the JSON string is invalid with respect to OpenCreateAppDTO - */ - public static OpenCreateAppDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenCreateAppDTO.class); - } - - /** - * Convert an instance of OpenCreateAppDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java deleted file mode 100644 index cb2a804..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java +++ /dev/null @@ -1,245 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenEnvClusterDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenEnvClusterDTO { - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - @javax.annotation.Nullable - private String env; - - public static final String SERIALIZED_NAME_CLUSTERS = "clusters"; - @SerializedName(SERIALIZED_NAME_CLUSTERS) - @javax.annotation.Nullable - private List clusters = new ArrayList<>(); - - public OpenEnvClusterDTO() { - } - - public OpenEnvClusterDTO env(@javax.annotation.Nullable String env) { - this.env = env; - return this; - } - - /** - * - * @return env - */ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - public void setEnv(@javax.annotation.Nullable String env) { - this.env = env; - } - - - public OpenEnvClusterDTO clusters(@javax.annotation.Nullable List clusters) { - this.clusters = clusters; - return this; - } - - public OpenEnvClusterDTO addClustersItem(String clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - return this; - } - - /** - * - * @return clusters - */ - @javax.annotation.Nullable - public List getClusters() { - return clusters; - } - - public void setClusters(@javax.annotation.Nullable List clusters) { - this.clusters = clusters; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvClusterDTO openEnvClusterDTO = (OpenEnvClusterDTO) o; - return Objects.equals(this.env, openEnvClusterDTO.env) && - Objects.equals(this.clusters, openEnvClusterDTO.clusters); - } - - @Override - public int hashCode() { - return Objects.hash(env, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvClusterDTO {\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("env", "clusters")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenEnvClusterDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenEnvClusterDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenEnvClusterDTO is not found in the empty JSON string", OpenEnvClusterDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenEnvClusterDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenEnvClusterDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("clusters") != null && !jsonObj.get("clusters").isJsonNull() && !jsonObj.get("clusters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `clusters` to be an array in the JSON string but got `%s`", jsonObj.get("clusters").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenEnvClusterDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenEnvClusterDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenEnvClusterDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenEnvClusterDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenEnvClusterDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenEnvClusterDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenEnvClusterDTO - * @throws IOException if the JSON string is invalid with respect to OpenEnvClusterDTO - */ - public static OpenEnvClusterDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenEnvClusterDTO.class); - } - - /** - * Convert an instance of OpenEnvClusterDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java deleted file mode 100644 index 7c63ab9..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenGrayReleaseRuleDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_BRANCH_NAME = "branchName"; - @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - @javax.annotation.Nullable - private String branchName; - - public static final String SERIALIZED_NAME_RULE_ITEMS = "ruleItems"; - @SerializedName(SERIALIZED_NAME_RULE_ITEMS) - @javax.annotation.Nullable - private List ruleItems = new ArrayList<>(); - - public OpenGrayReleaseRuleDTO() { - } - - public OpenGrayReleaseRuleDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenGrayReleaseRuleDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 灰度规则创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 灰度规则最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenGrayReleaseRuleDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public OpenGrayReleaseRuleDTO clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public OpenGrayReleaseRuleDTO namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * 所属命名空间的名称 - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenGrayReleaseRuleDTO branchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - return this; - } - - /** - * 灰度分支名称,标识灰度发布的分支 - * @return branchName - */ - @javax.annotation.Nullable - public String getBranchName() { - return branchName; - } - - public void setBranchName(@javax.annotation.Nullable String branchName) { - this.branchName = branchName; - } - - - public OpenGrayReleaseRuleDTO ruleItems(@javax.annotation.Nullable List ruleItems) { - this.ruleItems = ruleItems; - return this; - } - - public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleItemsItem) { - if (this.ruleItems == null) { - this.ruleItems = new ArrayList<>(); - } - this.ruleItems.add(ruleItemsItem); - return this; - } - - /** - * 灰度发布规则项列表,包含具体的灰度规则条件 - * @return ruleItems - */ - @javax.annotation.Nullable - public List getRuleItems() { - return ruleItems; - } - - public void setRuleItems(@javax.annotation.Nullable List ruleItems) { - this.ruleItems = ruleItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = (OpenGrayReleaseRuleDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openGrayReleaseRuleDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openGrayReleaseRuleDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openGrayReleaseRuleDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openGrayReleaseRuleDTO.dataChangeLastModifiedTime) && - Objects.equals(this.appId, openGrayReleaseRuleDTO.appId) && - Objects.equals(this.clusterName, openGrayReleaseRuleDTO.clusterName) && - Objects.equals(this.namespaceName, openGrayReleaseRuleDTO.namespaceName) && - Objects.equals(this.branchName, openGrayReleaseRuleDTO.branchName) && - Objects.equals(this.ruleItems, openGrayReleaseRuleDTO.ruleItems); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, branchName, ruleItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenGrayReleaseRuleDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" ruleItems: ").append(toIndentedString(ruleItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenGrayReleaseRuleDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenGrayReleaseRuleDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenGrayReleaseRuleDTO is not found in the empty JSON string", OpenGrayReleaseRuleDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenGrayReleaseRuleDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenGrayReleaseRuleDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("branchName") != null && !jsonObj.get("branchName").isJsonNull()) && !jsonObj.get("branchName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `branchName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branchName").toString())); - } - if (jsonObj.get("ruleItems") != null && !jsonObj.get("ruleItems").isJsonNull()) { - JsonArray jsonArrayruleItems = jsonObj.getAsJsonArray("ruleItems"); - if (jsonArrayruleItems != null) { - // ensure the json data is an array - if (!jsonObj.get("ruleItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ruleItems` to be an array in the JSON string but got `%s`", jsonObj.get("ruleItems").toString())); - } - - // validate the optional field `ruleItems` (array) - for (int i = 0; i < jsonArrayruleItems.size(); i++) { - OpenGrayReleaseRuleItemDTO.validateJsonElement(jsonArrayruleItems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenGrayReleaseRuleDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenGrayReleaseRuleDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenGrayReleaseRuleDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenGrayReleaseRuleDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenGrayReleaseRuleDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenGrayReleaseRuleDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenGrayReleaseRuleDTO - * @throws IOException if the JSON string is invalid with respect to OpenGrayReleaseRuleDTO - */ - public static OpenGrayReleaseRuleDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenGrayReleaseRuleDTO.class); - } - - /** - * Convert an instance of OpenGrayReleaseRuleDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java deleted file mode 100644 index 2a44ed7..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenGrayReleaseRuleItemDTO { - public static final String SERIALIZED_NAME_CLIENT_APP_ID = "clientAppId"; - @SerializedName(SERIALIZED_NAME_CLIENT_APP_ID) - @javax.annotation.Nullable - private String clientAppId; - - public static final String SERIALIZED_NAME_CLIENT_IP_LIST = "clientIpList"; - @SerializedName(SERIALIZED_NAME_CLIENT_IP_LIST) - @javax.annotation.Nullable - private List clientIpList = new ArrayList<>(); - - public static final String SERIALIZED_NAME_CLIENT_LABEL_LIST = "clientLabelList"; - @SerializedName(SERIALIZED_NAME_CLIENT_LABEL_LIST) - @javax.annotation.Nullable - private List clientLabelList = new ArrayList<>(); - - public OpenGrayReleaseRuleItemDTO() { - } - - public OpenGrayReleaseRuleItemDTO clientAppId(@javax.annotation.Nullable String clientAppId) { - this.clientAppId = clientAppId; - return this; - } - - /** - * 客户端应用ID,指定哪个应用可以获取灰度配置 - * @return clientAppId - */ - @javax.annotation.Nullable - public String getClientAppId() { - return clientAppId; - } - - public void setClientAppId(@javax.annotation.Nullable String clientAppId) { - this.clientAppId = clientAppId; - } - - - public OpenGrayReleaseRuleItemDTO clientIpList(@javax.annotation.Nullable List clientIpList) { - this.clientIpList = clientIpList; - return this; - } - - public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { - if (this.clientIpList == null) { - this.clientIpList = new ArrayList<>(); - } - this.clientIpList.add(clientIpListItem); - return this; - } - - /** - * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - * @return clientIpList - */ - @javax.annotation.Nullable - public List getClientIpList() { - return clientIpList; - } - - public void setClientIpList(@javax.annotation.Nullable List clientIpList) { - this.clientIpList = clientIpList; - } - - - public OpenGrayReleaseRuleItemDTO clientLabelList(@javax.annotation.Nullable List clientLabelList) { - this.clientLabelList = clientLabelList; - return this; - } - - public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListItem) { - if (this.clientLabelList == null) { - this.clientLabelList = new ArrayList<>(); - } - this.clientLabelList.add(clientLabelListItem); - return this; - } - - /** - * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - * @return clientLabelList - */ - @javax.annotation.Nullable - public List getClientLabelList() { - return clientLabelList; - } - - public void setClientLabelList(@javax.annotation.Nullable List clientLabelList) { - this.clientLabelList = clientLabelList; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenGrayReleaseRuleItemDTO openGrayReleaseRuleItemDTO = (OpenGrayReleaseRuleItemDTO) o; - return Objects.equals(this.clientAppId, openGrayReleaseRuleItemDTO.clientAppId) && - Objects.equals(this.clientIpList, openGrayReleaseRuleItemDTO.clientIpList) && - Objects.equals(this.clientLabelList, openGrayReleaseRuleItemDTO.clientLabelList); - } - - @Override - public int hashCode() { - return Objects.hash(clientAppId, clientIpList, clientLabelList); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenGrayReleaseRuleItemDTO {\n"); - sb.append(" clientAppId: ").append(toIndentedString(clientAppId)).append("\n"); - sb.append(" clientIpList: ").append(toIndentedString(clientIpList)).append("\n"); - sb.append(" clientLabelList: ").append(toIndentedString(clientLabelList)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("clientAppId", "clientIpList", "clientLabelList")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenGrayReleaseRuleItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenGrayReleaseRuleItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenGrayReleaseRuleItemDTO is not found in the empty JSON string", OpenGrayReleaseRuleItemDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenGrayReleaseRuleItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenGrayReleaseRuleItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("clientAppId") != null && !jsonObj.get("clientAppId").isJsonNull()) && !jsonObj.get("clientAppId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clientAppId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clientAppId").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("clientIpList") != null && !jsonObj.get("clientIpList").isJsonNull() && !jsonObj.get("clientIpList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `clientIpList` to be an array in the JSON string but got `%s`", jsonObj.get("clientIpList").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("clientLabelList") != null && !jsonObj.get("clientLabelList").isJsonNull() && !jsonObj.get("clientLabelList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `clientLabelList` to be an array in the JSON string but got `%s`", jsonObj.get("clientLabelList").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenGrayReleaseRuleItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenGrayReleaseRuleItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenGrayReleaseRuleItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenGrayReleaseRuleItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenGrayReleaseRuleItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenGrayReleaseRuleItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenGrayReleaseRuleItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenGrayReleaseRuleItemDTO - */ - public static OpenGrayReleaseRuleItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenGrayReleaseRuleItemDTO.class); - } - - /** - * Convert an instance of OpenGrayReleaseRuleItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java deleted file mode 100644 index 90792b1..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.OpenReleaseDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenInstanceConfigDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenInstanceConfigDTO { - public static final String SERIALIZED_NAME_RELEASE = "release"; - @SerializedName(SERIALIZED_NAME_RELEASE) - @javax.annotation.Nullable - private OpenReleaseDTO release; - - public static final String SERIALIZED_NAME_RELEASE_DELIVERY_TIME = "releaseDeliveryTime"; - @SerializedName(SERIALIZED_NAME_RELEASE_DELIVERY_TIME) - @javax.annotation.Nullable - private String releaseDeliveryTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public OpenInstanceConfigDTO() { - } - - public OpenInstanceConfigDTO release(@javax.annotation.Nullable OpenReleaseDTO release) { - this.release = release; - return this; - } - - /** - * Get release - * @return release - */ - @javax.annotation.Nullable - public OpenReleaseDTO getRelease() { - return release; - } - - public void setRelease(@javax.annotation.Nullable OpenReleaseDTO release) { - this.release = release; - } - - - public OpenInstanceConfigDTO releaseDeliveryTime(@javax.annotation.Nullable String releaseDeliveryTime) { - this.releaseDeliveryTime = releaseDeliveryTime; - return this; - } - - /** - * - * @return releaseDeliveryTime - */ - @javax.annotation.Nullable - public String getReleaseDeliveryTime() { - return releaseDeliveryTime; - } - - public void setReleaseDeliveryTime(@javax.annotation.Nullable String releaseDeliveryTime) { - this.releaseDeliveryTime = releaseDeliveryTime; - } - - - public OpenInstanceConfigDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstanceConfigDTO openInstanceConfigDTO = (OpenInstanceConfigDTO) o; - return Objects.equals(this.release, openInstanceConfigDTO.release) && - Objects.equals(this.releaseDeliveryTime, openInstanceConfigDTO.releaseDeliveryTime) && - Objects.equals(this.dataChangeLastModifiedTime, openInstanceConfigDTO.dataChangeLastModifiedTime); - } - - @Override - public int hashCode() { - return Objects.hash(release, releaseDeliveryTime, dataChangeLastModifiedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstanceConfigDTO {\n"); - sb.append(" release: ").append(toIndentedString(release)).append("\n"); - sb.append(" releaseDeliveryTime: ").append(toIndentedString(releaseDeliveryTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("release", "releaseDeliveryTime", "dataChangeLastModifiedTime")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenInstanceConfigDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenInstanceConfigDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenInstanceConfigDTO is not found in the empty JSON string", OpenInstanceConfigDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenInstanceConfigDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstanceConfigDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `release` - if (jsonObj.get("release") != null && !jsonObj.get("release").isJsonNull()) { - OpenReleaseDTO.validateJsonElement(jsonObj.get("release")); - } - if ((jsonObj.get("releaseDeliveryTime") != null && !jsonObj.get("releaseDeliveryTime").isJsonNull()) && !jsonObj.get("releaseDeliveryTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseDeliveryTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseDeliveryTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenInstanceConfigDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenInstanceConfigDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenInstanceConfigDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenInstanceConfigDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenInstanceConfigDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenInstanceConfigDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenInstanceConfigDTO - * @throws IOException if the JSON string is invalid with respect to OpenInstanceConfigDTO - */ - public static OpenInstanceConfigDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenInstanceConfigDTO.class); - } - - /** - * Convert an instance of OpenInstanceConfigDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java deleted file mode 100644 index f8dbea6..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenInstanceConfigDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenInstanceDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenInstanceDTO { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_DATA_CENTER = "dataCenter"; - @SerializedName(SERIALIZED_NAME_DATA_CENTER) - @javax.annotation.Nullable - private String dataCenter; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - @javax.annotation.Nullable - private String ip; - - public static final String SERIALIZED_NAME_CONFIGS = "configs"; - @SerializedName(SERIALIZED_NAME_CONFIGS) - @javax.annotation.Nullable - private List configs = new ArrayList<>(); - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public OpenInstanceDTO() { - } - - public OpenInstanceDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public OpenInstanceDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public OpenInstanceDTO clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public OpenInstanceDTO dataCenter(@javax.annotation.Nullable String dataCenter) { - this.dataCenter = dataCenter; - return this; - } - - /** - * - * @return dataCenter - */ - @javax.annotation.Nullable - public String getDataCenter() { - return dataCenter; - } - - public void setDataCenter(@javax.annotation.Nullable String dataCenter) { - this.dataCenter = dataCenter; - } - - - public OpenInstanceDTO ip(@javax.annotation.Nullable String ip) { - this.ip = ip; - return this; - } - - /** - * - * @return ip - */ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - public void setIp(@javax.annotation.Nullable String ip) { - this.ip = ip; - } - - - public OpenInstanceDTO configs(@javax.annotation.Nullable List configs) { - this.configs = configs; - return this; - } - - public OpenInstanceDTO addConfigsItem(OpenInstanceConfigDTO configsItem) { - if (this.configs == null) { - this.configs = new ArrayList<>(); - } - this.configs.add(configsItem); - return this; - } - - /** - * - * @return configs - */ - @javax.annotation.Nullable - public List getConfigs() { - return configs; - } - - public void setConfigs(@javax.annotation.Nullable List configs) { - this.configs = configs; - } - - - public OpenInstanceDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstanceDTO openInstanceDTO = (OpenInstanceDTO) o; - return Objects.equals(this.id, openInstanceDTO.id) && - Objects.equals(this.appId, openInstanceDTO.appId) && - Objects.equals(this.clusterName, openInstanceDTO.clusterName) && - Objects.equals(this.dataCenter, openInstanceDTO.dataCenter) && - Objects.equals(this.ip, openInstanceDTO.ip) && - Objects.equals(this.configs, openInstanceDTO.configs) && - Objects.equals(this.dataChangeCreatedTime, openInstanceDTO.dataChangeCreatedTime); - } - - @Override - public int hashCode() { - return Objects.hash(id, appId, clusterName, dataCenter, ip, configs, dataChangeCreatedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstanceDTO {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" configs: ").append(toIndentedString(configs)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenInstanceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenInstanceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenInstanceDTO is not found in the empty JSON string", OpenInstanceDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenInstanceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstanceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("dataCenter") != null && !jsonObj.get("dataCenter").isJsonNull()) && !jsonObj.get("dataCenter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataCenter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataCenter").toString())); - } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if (jsonObj.get("configs") != null && !jsonObj.get("configs").isJsonNull()) { - JsonArray jsonArrayconfigs = jsonObj.getAsJsonArray("configs"); - if (jsonArrayconfigs != null) { - // ensure the json data is an array - if (!jsonObj.get("configs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `configs` to be an array in the JSON string but got `%s`", jsonObj.get("configs").toString())); - } - - // validate the optional field `configs` (array) - for (int i = 0; i < jsonArrayconfigs.size(); i++) { - OpenInstanceConfigDTO.validateJsonElement(jsonArrayconfigs.get(i)); - }; - } - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenInstanceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenInstanceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenInstanceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenInstanceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenInstanceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenInstanceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenInstanceDTO - * @throws IOException if the JSON string is invalid with respect to OpenInstanceDTO - */ - public static OpenInstanceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenInstanceDTO.class); - } - - /** - * Convert an instance of OpenInstanceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java deleted file mode 100644 index b36c7bc..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenItemDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - @javax.annotation.Nullable - private String key; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nullable - private Integer type; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - @javax.annotation.Nullable - private String value; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public OpenItemDTO() { - } - - public OpenItemDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 配置项创建者用户名,记录是谁创建了这个配置项 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenItemDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 配置项最后修改者用户名,记录最后一次修改配置的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenItemDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 配置项创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenItemDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 配置项最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenItemDTO key(@javax.annotation.Nullable String key) { - this.key = key; - return this; - } - - /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @return key - */ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - public void setKey(@javax.annotation.Nullable String key) { - this.key = key; - } - - - public OpenItemDTO type(@javax.annotation.Nullable Integer type) { - this.type = type; - return this; - } - - /** - * 配置项类型,0表示普通配置项,1表示文件类型配置项 - * @return type - */ - @javax.annotation.Nullable - public Integer getType() { - return type; - } - - public void setType(@javax.annotation.Nullable Integer type) { - this.type = type; - } - - - public OpenItemDTO value(@javax.annotation.Nullable String value) { - this.value = value; - return this; - } - - /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @return value - */ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - public void setValue(@javax.annotation.Nullable String value) { - this.value = value; - } - - - public OpenItemDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemDTO openItemDTO = (OpenItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openItemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openItemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openItemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openItemDTO.dataChangeLastModifiedTime) && - Objects.equals(this.key, openItemDTO.key) && - Objects.equals(this.type, openItemDTO.type) && - Objects.equals(this.value, openItemDTO.value) && - Objects.equals(this.comment, openItemDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, key, type, value, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemDTO is not found in the empty JSON string", OpenItemDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenItemDTO - */ - public static OpenItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenItemDTO.class); - } - - /** - * Convert an instance of OpenItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java deleted file mode 100644 index 3695743..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenNamespaceDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - @javax.annotation.Nullable - private String format; - - public static final String SERIALIZED_NAME_IS_PUBLIC = "isPublic"; - @SerializedName(SERIALIZED_NAME_IS_PUBLIC) - @javax.annotation.Nullable - private Boolean isPublic; - - public static final String SERIALIZED_NAME_ITEMS = "items"; - @SerializedName(SERIALIZED_NAME_ITEMS) - @javax.annotation.Nullable - private List items = new ArrayList<>(); - - public OpenNamespaceDTO() { - } - - public OpenNamespaceDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 命名空间创建者用户名,记录是谁创建了这个命名空间 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenNamespaceDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenNamespaceDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 命名空间创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenNamespaceDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 命名空间最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenNamespaceDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public OpenNamespaceDTO clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public OpenNamespaceDTO namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenNamespaceDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * 命名空间备注说明,描述命名空间的用途 - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - public OpenNamespaceDTO format(@javax.annotation.Nullable String format) { - this.format = format; - return this; - } - - /** - * 命名空间格式类型,如properties、xml、json、yml等 - * @return format - */ - @javax.annotation.Nullable - public String getFormat() { - return format; - } - - public void setFormat(@javax.annotation.Nullable String format) { - this.format = format; - } - - - public OpenNamespaceDTO isPublic(@javax.annotation.Nullable Boolean isPublic) { - this.isPublic = isPublic; - return this; - } - - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @return isPublic - */ - @javax.annotation.Nullable - public Boolean getIsPublic() { - return isPublic; - } - - public void setIsPublic(@javax.annotation.Nullable Boolean isPublic) { - this.isPublic = isPublic; - } - - - public OpenNamespaceDTO items(@javax.annotation.Nullable List items) { - this.items = items; - return this; - } - - public OpenNamespaceDTO addItemsItem(OpenItemDTO itemsItem) { - if (this.items == null) { - this.items = new ArrayList<>(); - } - this.items.add(itemsItem); - return this; - } - - /** - * 命名空间包含的配置项列表 - * @return items - */ - @javax.annotation.Nullable - public List getItems() { - return items; - } - - public void setItems(@javax.annotation.Nullable List items) { - this.items = items; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceDTO openNamespaceDTO = (OpenNamespaceDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openNamespaceDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openNamespaceDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openNamespaceDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openNamespaceDTO.dataChangeLastModifiedTime) && - Objects.equals(this.appId, openNamespaceDTO.appId) && - Objects.equals(this.clusterName, openNamespaceDTO.clusterName) && - Objects.equals(this.namespaceName, openNamespaceDTO.namespaceName) && - Objects.equals(this.comment, openNamespaceDTO.comment) && - Objects.equals(this.format, openNamespaceDTO.format) && - Objects.equals(this.isPublic, openNamespaceDTO.isPublic) && - Objects.equals(this.items, openNamespaceDTO.items); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenNamespaceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceDTO is not found in the empty JSON string", OpenNamespaceDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenNamespaceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - OpenItemDTO.validateJsonElement(jsonArrayitems.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenNamespaceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceDTO - */ - public static OpenNamespaceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceDTO.class); - } - - /** - * Convert an instance of OpenNamespaceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java deleted file mode 100644 index eeccad8..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo命名空间锁状态数据传输对象 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenNamespaceLockDTO { - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_IS_LOCKED = "isLocked"; - @SerializedName(SERIALIZED_NAME_IS_LOCKED) - @javax.annotation.Nullable - private Boolean isLocked; - - public static final String SERIALIZED_NAME_LOCKED_BY = "lockedBy"; - @SerializedName(SERIALIZED_NAME_LOCKED_BY) - @javax.annotation.Nullable - private String lockedBy; - - public OpenNamespaceLockDTO() { - } - - public OpenNamespaceLockDTO namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称 - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenNamespaceLockDTO isLocked(@javax.annotation.Nullable Boolean isLocked) { - this.isLocked = isLocked; - return this; - } - - /** - * 是否被锁定 - * @return isLocked - */ - @javax.annotation.Nullable - public Boolean getIsLocked() { - return isLocked; - } - - public void setIsLocked(@javax.annotation.Nullable Boolean isLocked) { - this.isLocked = isLocked; - } - - - public OpenNamespaceLockDTO lockedBy(@javax.annotation.Nullable String lockedBy) { - this.lockedBy = lockedBy; - return this; - } - - /** - * 锁定者用户名 - * @return lockedBy - */ - @javax.annotation.Nullable - public String getLockedBy() { - return lockedBy; - } - - public void setLockedBy(@javax.annotation.Nullable String lockedBy) { - this.lockedBy = lockedBy; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceLockDTO openNamespaceLockDTO = (OpenNamespaceLockDTO) o; - return Objects.equals(this.namespaceName, openNamespaceLockDTO.namespaceName) && - Objects.equals(this.isLocked, openNamespaceLockDTO.isLocked) && - Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy); - } - - @Override - public int hashCode() { - return Objects.hash(namespaceName, isLocked, lockedBy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceLockDTO {\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" isLocked: ").append(toIndentedString(isLocked)).append("\n"); - sb.append(" lockedBy: ").append(toIndentedString(lockedBy)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("namespaceName", "isLocked", "lockedBy")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenNamespaceLockDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenNamespaceLockDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceLockDTO is not found in the empty JSON string", OpenNamespaceLockDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenNamespaceLockDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceLockDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("lockedBy") != null && !jsonObj.get("lockedBy").isJsonNull()) && !jsonObj.get("lockedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lockedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lockedBy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceLockDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceLockDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceLockDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceLockDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceLockDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenNamespaceLockDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceLockDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceLockDTO - */ - public static OpenNamespaceLockDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceLockDTO.class); - } - - /** - * Convert an instance of OpenNamespaceLockDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java b/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java deleted file mode 100644 index 5d94f34..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenOrganizationDto - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenOrganizationDto { - public static final String SERIALIZED_NAME_ORG_ID = "orgId"; - @SerializedName(SERIALIZED_NAME_ORG_ID) - @javax.annotation.Nullable - private String orgId; - - public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; - @SerializedName(SERIALIZED_NAME_ORG_NAME) - @javax.annotation.Nullable - private String orgName; - - public OpenOrganizationDto() { - } - - public OpenOrganizationDto orgId(@javax.annotation.Nullable String orgId) { - this.orgId = orgId; - return this; - } - - /** - * - * @return orgId - */ - @javax.annotation.Nullable - public String getOrgId() { - return orgId; - } - - public void setOrgId(@javax.annotation.Nullable String orgId) { - this.orgId = orgId; - } - - - public OpenOrganizationDto orgName(@javax.annotation.Nullable String orgName) { - this.orgName = orgName; - return this; - } - - /** - * - * @return orgName - */ - @javax.annotation.Nullable - public String getOrgName() { - return orgName; - } - - public void setOrgName(@javax.annotation.Nullable String orgName) { - this.orgName = orgName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenOrganizationDto openOrganizationDto = (OpenOrganizationDto) o; - return Objects.equals(this.orgId, openOrganizationDto.orgId) && - Objects.equals(this.orgName, openOrganizationDto.orgName); - } - - @Override - public int hashCode() { - return Objects.hash(orgId, orgName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenOrganizationDto {\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("orgId", "orgName")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenOrganizationDto - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenOrganizationDto.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenOrganizationDto is not found in the empty JSON string", OpenOrganizationDto.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenOrganizationDto.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenOrganizationDto` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("orgId") != null && !jsonObj.get("orgId").isJsonNull()) && !jsonObj.get("orgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgId").toString())); - } - if ((jsonObj.get("orgName") != null && !jsonObj.get("orgName").isJsonNull()) && !jsonObj.get("orgName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenOrganizationDto.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenOrganizationDto' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenOrganizationDto.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenOrganizationDto value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenOrganizationDto read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenOrganizationDto given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenOrganizationDto - * @throws IOException if the JSON string is invalid with respect to OpenOrganizationDto - */ - public static OpenOrganizationDto fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenOrganizationDto.class); - } - - /** - * Convert an instance of OpenOrganizationDto to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java deleted file mode 100644 index e93f5ba..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenInstanceDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 分页实例数据传输对象,用于返回分页查询的实例列表结果 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenPageDTOOpenInstanceDTO { - public static final String SERIALIZED_NAME_PAGE = "page"; - @SerializedName(SERIALIZED_NAME_PAGE) - @javax.annotation.Nullable - private Integer page; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - @javax.annotation.Nullable - private Integer size; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - @javax.annotation.Nullable - private Long total; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private List content = new ArrayList<>(); - - public OpenPageDTOOpenInstanceDTO() { - } - - public OpenPageDTOOpenInstanceDTO page(@javax.annotation.Nullable Integer page) { - this.page = page; - return this; - } - - /** - * 当前页码,从0开始计数 - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public void setPage(@javax.annotation.Nullable Integer page) { - this.page = page; - } - - - public OpenPageDTOOpenInstanceDTO size(@javax.annotation.Nullable Integer size) { - this.size = size; - return this; - } - - /** - * 每页显示的记录数量 - * @return size - */ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - public void setSize(@javax.annotation.Nullable Integer size) { - this.size = size; - } - - - public OpenPageDTOOpenInstanceDTO total(@javax.annotation.Nullable Long total) { - this.total = total; - return this; - } - - /** - * 总记录数,符合查询条件的实例总数量 - * @return total - */ - @javax.annotation.Nullable - public Long getTotal() { - return total; - } - - public void setTotal(@javax.annotation.Nullable Long total) { - this.total = total; - } - - - public OpenPageDTOOpenInstanceDTO content(@javax.annotation.Nullable List content) { - this.content = content; - return this; - } - - public OpenPageDTOOpenInstanceDTO addContentItem(OpenInstanceDTO contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); - } - this.content.add(contentItem); - return this; - } - - /** - * 当前页的实例列表,包含具体的实例数据 - * @return content - */ - @javax.annotation.Nullable - public List getContent() { - return content; - } - - public void setContent(@javax.annotation.Nullable List content) { - this.content = content; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenPageDTOOpenInstanceDTO openPageDTOOpenInstanceDTO = (OpenPageDTOOpenInstanceDTO) o; - return Objects.equals(this.page, openPageDTOOpenInstanceDTO.page) && - Objects.equals(this.size, openPageDTOOpenInstanceDTO.size) && - Objects.equals(this.total, openPageDTOOpenInstanceDTO.total) && - Objects.equals(this.content, openPageDTOOpenInstanceDTO.content); - } - - @Override - public int hashCode() { - return Objects.hash(page, size, total, content); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenPageDTOOpenInstanceDTO {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("page", "size", "total", "content")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenPageDTOOpenInstanceDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenPageDTOOpenInstanceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenPageDTOOpenInstanceDTO is not found in the empty JSON string", OpenPageDTOOpenInstanceDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenPageDTOOpenInstanceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenPageDTOOpenInstanceDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { - JsonArray jsonArraycontent = jsonObj.getAsJsonArray("content"); - if (jsonArraycontent != null) { - // ensure the json data is an array - if (!jsonObj.get("content").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `content` to be an array in the JSON string but got `%s`", jsonObj.get("content").toString())); - } - - // validate the optional field `content` (array) - for (int i = 0; i < jsonArraycontent.size(); i++) { - OpenInstanceDTO.validateJsonElement(jsonArraycontent.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenPageDTOOpenInstanceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenPageDTOOpenInstanceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenPageDTOOpenInstanceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenPageDTOOpenInstanceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenPageDTOOpenInstanceDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenPageDTOOpenInstanceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenPageDTOOpenInstanceDTO - * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenInstanceDTO - */ - public static OpenPageDTOOpenInstanceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenPageDTOOpenInstanceDTO.class); - } - - /** - * Convert an instance of OpenPageDTOOpenInstanceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java deleted file mode 100644 index eb6727e..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenPageDTOOpenItemDTO { - public static final String SERIALIZED_NAME_PAGE = "page"; - @SerializedName(SERIALIZED_NAME_PAGE) - @javax.annotation.Nullable - private Integer page; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - @javax.annotation.Nullable - private Integer size; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - @javax.annotation.Nullable - private Long total; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - @javax.annotation.Nullable - private List content = new ArrayList<>(); - - public OpenPageDTOOpenItemDTO() { - } - - public OpenPageDTOOpenItemDTO page(@javax.annotation.Nullable Integer page) { - this.page = page; - return this; - } - - /** - * 当前页码,从0开始计数 - * @return page - */ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - public void setPage(@javax.annotation.Nullable Integer page) { - this.page = page; - } - - - public OpenPageDTOOpenItemDTO size(@javax.annotation.Nullable Integer size) { - this.size = size; - return this; - } - - /** - * 每页显示的记录数量 - * @return size - */ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - public void setSize(@javax.annotation.Nullable Integer size) { - this.size = size; - } - - - public OpenPageDTOOpenItemDTO total(@javax.annotation.Nullable Long total) { - this.total = total; - return this; - } - - /** - * 总记录数,符合查询条件的配置项总数量 - * @return total - */ - @javax.annotation.Nullable - public Long getTotal() { - return total; - } - - public void setTotal(@javax.annotation.Nullable Long total) { - this.total = total; - } - - - public OpenPageDTOOpenItemDTO content(@javax.annotation.Nullable List content) { - this.content = content; - return this; - } - - public OpenPageDTOOpenItemDTO addContentItem(OpenItemDTO contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); - } - this.content.add(contentItem); - return this; - } - - /** - * 当前页的配置项列表,包含具体的配置项数据 - * @return content - */ - @javax.annotation.Nullable - public List getContent() { - return content; - } - - public void setContent(@javax.annotation.Nullable List content) { - this.content = content; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenPageDTOOpenItemDTO openPageDTOOpenItemDTO = (OpenPageDTOOpenItemDTO) o; - return Objects.equals(this.page, openPageDTOOpenItemDTO.page) && - Objects.equals(this.size, openPageDTOOpenItemDTO.size) && - Objects.equals(this.total, openPageDTOOpenItemDTO.total) && - Objects.equals(this.content, openPageDTOOpenItemDTO.content); - } - - @Override - public int hashCode() { - return Objects.hash(page, size, total, content); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenPageDTOOpenItemDTO {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("page", "size", "total", "content")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenPageDTOOpenItemDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenPageDTOOpenItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenPageDTOOpenItemDTO is not found in the empty JSON string", OpenPageDTOOpenItemDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenPageDTOOpenItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenPageDTOOpenItemDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { - JsonArray jsonArraycontent = jsonObj.getAsJsonArray("content"); - if (jsonArraycontent != null) { - // ensure the json data is an array - if (!jsonObj.get("content").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `content` to be an array in the JSON string but got `%s`", jsonObj.get("content").toString())); - } - - // validate the optional field `content` (array) - for (int i = 0; i < jsonArraycontent.size(); i++) { - OpenItemDTO.validateJsonElement(jsonArraycontent.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenPageDTOOpenItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenPageDTOOpenItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenPageDTOOpenItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenPageDTOOpenItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenPageDTOOpenItemDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenPageDTOOpenItemDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenPageDTOOpenItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenItemDTO - */ - public static OpenPageDTOOpenItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenPageDTOOpenItemDTO.class); - } - - /** - * Convert an instance of OpenPageDTOOpenItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java deleted file mode 100644 index dde47d8..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.MapString; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenReleaseDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_CONFIGURATIONS = "configurations"; - @SerializedName(SERIALIZED_NAME_CONFIGURATIONS) - @javax.annotation.Nullable - private MapString configurations; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public OpenReleaseDTO() { - } - - public OpenReleaseDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 发布创建者用户名,记录是谁创建了这次发布 - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenReleaseDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 发布最后修改者用户名,记录最后一次修改发布信息的用户 - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenReleaseDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * 发布创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenReleaseDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * 发布最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenReleaseDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * 发布记录的唯一标识符,系统自动生成 - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public OpenReleaseDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public OpenReleaseDTO clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public OpenReleaseDTO namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * 所属命名空间的名称 - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenReleaseDTO name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * 发布名称,用于标识这次发布的版本或描述 - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - - public OpenReleaseDTO configurations(@javax.annotation.Nullable MapString configurations) { - this.configurations = configurations; - return this; - } - - /** - * Get configurations - * @return configurations - */ - @javax.annotation.Nullable - public MapString getConfigurations() { - return configurations; - } - - public void setConfigurations(@javax.annotation.Nullable MapString configurations) { - this.configurations = configurations; - } - - - public OpenReleaseDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * 发布备注,描述本次发布的变更内容和目的 - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseDTO openReleaseDTO = (OpenReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openReleaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openReleaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedTime, openReleaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openReleaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, openReleaseDTO.id) && - Objects.equals(this.appId, openReleaseDTO.appId) && - Objects.equals(this.clusterName, openReleaseDTO.clusterName) && - Objects.equals(this.namespaceName, openReleaseDTO.namespaceName) && - Objects.equals(this.name, openReleaseDTO.name) && - Objects.equals(this.configurations, openReleaseDTO.configurations) && - Objects.equals(this.comment, openReleaseDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, id, appId, clusterName, namespaceName, name, configurations, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenReleaseDTO is not found in the empty JSON string", OpenReleaseDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // validate the optional field `configurations` - if (jsonObj.get("configurations") != null && !jsonObj.get("configurations").isJsonNull()) { - MapString.validateJsonElement(jsonObj.get("configurations")); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenReleaseDTO - * @throws IOException if the JSON string is invalid with respect to OpenReleaseDTO - */ - public static OpenReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenReleaseDTO.class); - } - - /** - * Convert an instance of OpenReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java deleted file mode 100644 index c27c3a6..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsGet401Response.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1AppsGet401Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsGet401Response { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public OpenapiV1AppsGet401Response() { - } - - public OpenapiV1AppsGet401Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsGet401Response openapiV1AppsGet401Response = (OpenapiV1AppsGet401Response) o; - return Objects.equals(this.message, openapiV1AppsGet401Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsGet401Response {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1AppsGet401Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1AppsGet401Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1AppsGet401Response is not found in the empty JSON string", OpenapiV1AppsGet401Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1AppsGet401Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1AppsGet401Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1AppsGet401Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1AppsGet401Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1AppsGet401Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1AppsGet401Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1AppsGet401Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1AppsGet401Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1AppsGet401Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1AppsGet401Response - */ - public static OpenapiV1AppsGet401Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1AppsGet401Response.class); - } - - /** - * Convert an instance of OpenapiV1AppsGet401Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java deleted file mode 100644 index d72b86f..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPost400Response.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1AppsPost400Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsPost400Response { - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_EXCEPTION = "exception"; - @SerializedName(SERIALIZED_NAME_EXCEPTION) - @javax.annotation.Nullable - private String exception; - - public OpenapiV1AppsPost400Response() { - } - - public OpenapiV1AppsPost400Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public OpenapiV1AppsPost400Response exception(@javax.annotation.Nullable String exception) { - this.exception = exception; - return this; - } - - /** - * Get exception - * @return exception - */ - @javax.annotation.Nullable - public String getException() { - return exception; - } - - public void setException(@javax.annotation.Nullable String exception) { - this.exception = exception; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsPost400Response openapiV1AppsPost400Response = (OpenapiV1AppsPost400Response) o; - return Objects.equals(this.message, openapiV1AppsPost400Response.message) && - Objects.equals(this.exception, openapiV1AppsPost400Response.exception); - } - - @Override - public int hashCode() { - return Objects.hash(message, exception); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsPost400Response {\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("message", "exception")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1AppsPost400Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1AppsPost400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1AppsPost400Response is not found in the empty JSON string", OpenapiV1AppsPost400Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1AppsPost400Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1AppsPost400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("exception") != null && !jsonObj.get("exception").isJsonNull()) && !jsonObj.get("exception").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exception` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exception").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1AppsPost400Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1AppsPost400Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1AppsPost400Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1AppsPost400Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1AppsPost400Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1AppsPost400Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1AppsPost400Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1AppsPost400Response - */ - public static OpenapiV1AppsPost400Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1AppsPost400Response.class); - } - - /** - * Convert an instance of OpenapiV1AppsPost400Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java deleted file mode 100644 index a7629a6..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1AppsPostRequest.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenAppDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1AppsPostRequest { - public static final String SERIALIZED_NAME_APP = "app"; - @SerializedName(SERIALIZED_NAME_APP) - @javax.annotation.Nonnull - private OpenAppDTO app; - - public static final String SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF = "assignAppRoleToSelf"; - @SerializedName(SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF) - @javax.annotation.Nonnull - private Boolean assignAppRoleToSelf; - - public static final String SERIALIZED_NAME_ADMINS = "admins"; - @SerializedName(SERIALIZED_NAME_ADMINS) - @javax.annotation.Nonnull - private List admins = new ArrayList<>(); - - public OpenapiV1AppsPostRequest() { - } - - public OpenapiV1AppsPostRequest app(@javax.annotation.Nonnull OpenAppDTO app) { - this.app = app; - return this; - } - - /** - * Get app - * @return app - */ - @javax.annotation.Nonnull - public OpenAppDTO getApp() { - return app; - } - - public void setApp(@javax.annotation.Nonnull OpenAppDTO app) { - this.app = app; - } - - - public OpenapiV1AppsPostRequest assignAppRoleToSelf(@javax.annotation.Nonnull Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - return this; - } - - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @return assignAppRoleToSelf - */ - @javax.annotation.Nonnull - public Boolean getAssignAppRoleToSelf() { - return assignAppRoleToSelf; - } - - public void setAssignAppRoleToSelf(@javax.annotation.Nonnull Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - } - - - public OpenapiV1AppsPostRequest admins(@javax.annotation.Nonnull List admins) { - this.admins = admins; - return this; - } - - public OpenapiV1AppsPostRequest addAdminsItem(String adminsItem) { - if (this.admins == null) { - this.admins = new ArrayList<>(); - } - this.admins.add(adminsItem); - return this; - } - - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @return admins - */ - @javax.annotation.Nonnull - public List getAdmins() { - return admins; - } - - public void setAdmins(@javax.annotation.Nonnull List admins) { - this.admins = admins; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = (OpenapiV1AppsPostRequest) o; - return Objects.equals(this.app, openapiV1AppsPostRequest.app) && - Objects.equals(this.assignAppRoleToSelf, openapiV1AppsPostRequest.assignAppRoleToSelf) && - Objects.equals(this.admins, openapiV1AppsPostRequest.admins); - } - - @Override - public int hashCode() { - return Objects.hash(app, assignAppRoleToSelf, admins); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1AppsPostRequest {\n"); - sb.append(" app: ").append(toIndentedString(app)).append("\n"); - sb.append(" assignAppRoleToSelf: ").append(toIndentedString(assignAppRoleToSelf)).append("\n"); - sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("assignAppRoleToSelf", "admins", "app")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("app", "assignAppRoleToSelf", "admins")); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1AppsPostRequest - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1AppsPostRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1AppsPostRequest is not found in the empty JSON string", OpenapiV1AppsPostRequest.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1AppsPostRequest.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1AppsPostRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : OpenapiV1AppsPostRequest.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the required field `app` - OpenAppDTO.validateJsonElement(jsonObj.get("app")); - // ensure the required json array is present - if (jsonObj.get("admins") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("admins").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `admins` to be an array in the JSON string but got `%s`", jsonObj.get("admins").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1AppsPostRequest.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1AppsPostRequest' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1AppsPostRequest.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1AppsPostRequest value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1AppsPostRequest read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1AppsPostRequest given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1AppsPostRequest - * @throws IOException if the JSON string is invalid with respect to OpenapiV1AppsPostRequest - */ - public static OpenapiV1AppsPostRequest fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1AppsPostRequest.class); - } - - /** - * Convert an instance of OpenapiV1AppsPostRequest to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java deleted file mode 100644 index 0eb2267..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - public static final String SERIALIZED_NAME_VALID = "valid"; - @SerializedName(SERIALIZED_NAME_VALID) - @javax.annotation.Nullable - private Boolean valid; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response() { - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response valid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - @javax.annotation.Nullable - public Boolean getValid() { - return valid; - } - - public void setValid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - } - - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("valid", "message")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response is not found in the empty JSON string", OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - public static OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class); - } - - /** - * Convert an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java deleted file mode 100644 index da196bc..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - public static final String SERIALIZED_NAME_VALID = "valid"; - @SerializedName(SERIALIZED_NAME_VALID) - @javax.annotation.Nullable - private Boolean valid; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - @javax.annotation.Nullable - private String message; - - public static final String SERIALIZED_NAME_ERRORS = "errors"; - @SerializedName(SERIALIZED_NAME_ERRORS) - @javax.annotation.Nullable - private List errors = new ArrayList<>(); - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response() { - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response valid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - @javax.annotation.Nullable - public Boolean getValid() { - return valid; - } - - public void setValid(@javax.annotation.Nullable Boolean valid) { - this.valid = valid; - } - - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response message(@javax.annotation.Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - public void setMessage(@javax.annotation.Nullable String message) { - this.message = message; - } - - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - */ - @javax.annotation.Nullable - public List getErrors() { - return errors; - } - - public void setErrors(@javax.annotation.Nullable List errors) { - this.errors = errors; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.message) && - Objects.equals(this.errors, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.errors); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message, errors); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("valid", "message", "errors")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response is not found in the empty JSON string", OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - public static OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class); - } - - /** - * Convert an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java b/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java deleted file mode 100644 index 7b4171e..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java +++ /dev/null @@ -1,227 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Change; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenapiV1EnvsEnvReleasesCompareGet200Response - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvReleasesCompareGet200Response { - public static final String SERIALIZED_NAME_CHANGES = "changes"; - @SerializedName(SERIALIZED_NAME_CHANGES) - @javax.annotation.Nullable - private List changes = new ArrayList<>(); - - public OpenapiV1EnvsEnvReleasesCompareGet200Response() { - } - - public OpenapiV1EnvsEnvReleasesCompareGet200Response changes(@javax.annotation.Nullable List changes) { - this.changes = changes; - return this; - } - - public OpenapiV1EnvsEnvReleasesCompareGet200Response addChangesItem(Change changesItem) { - if (this.changes == null) { - this.changes = new ArrayList<>(); - } - this.changes.add(changesItem); - return this; - } - - /** - * Get changes - * @return changes - */ - @javax.annotation.Nullable - public List getChanges() { - return changes; - } - - public void setChanges(@javax.annotation.Nullable List changes) { - this.changes = changes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet200Response = (OpenapiV1EnvsEnvReleasesCompareGet200Response) o; - return Objects.equals(this.changes, openapiV1EnvsEnvReleasesCompareGet200Response.changes); - } - - @Override - public int hashCode() { - return Objects.hash(changes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvReleasesCompareGet200Response {\n"); - sb.append(" changes: ").append(toIndentedString(changes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("changes")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!OpenapiV1EnvsEnvReleasesCompareGet200Response.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenapiV1EnvsEnvReleasesCompareGet200Response is not found in the empty JSON string", OpenapiV1EnvsEnvReleasesCompareGet200Response.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!OpenapiV1EnvsEnvReleasesCompareGet200Response.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenapiV1EnvsEnvReleasesCompareGet200Response` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (jsonObj.get("changes") != null && !jsonObj.get("changes").isJsonNull()) { - JsonArray jsonArraychanges = jsonObj.getAsJsonArray("changes"); - if (jsonArraychanges != null) { - // ensure the json data is an array - if (!jsonObj.get("changes").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `changes` to be an array in the JSON string but got `%s`", jsonObj.get("changes").toString())); - } - - // validate the optional field `changes` (array) - for (int i = 0; i < jsonArraychanges.size(); i++) { - Change.validateJsonElement(jsonArraychanges.get(i)); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenapiV1EnvsEnvReleasesCompareGet200Response.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenapiV1EnvsEnvReleasesCompareGet200Response' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenapiV1EnvsEnvReleasesCompareGet200Response.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenapiV1EnvsEnvReleasesCompareGet200Response value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenapiV1EnvsEnvReleasesCompareGet200Response read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenapiV1EnvsEnvReleasesCompareGet200Response - * @throws IOException if the JSON string is invalid with respect to OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - public static OpenapiV1EnvsEnvReleasesCompareGet200Response fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenapiV1EnvsEnvReleasesCompareGet200Response.class); - } - - /** - * Convert an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java deleted file mode 100644 index 7240103..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/ReleaseDTO.java +++ /dev/null @@ -1,605 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ReleaseDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-09-14T17:08:15.997407+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ReleaseDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - @javax.annotation.Nullable - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - @javax.annotation.Nullable - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - @javax.annotation.Nullable - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - @javax.annotation.Nullable - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - @javax.annotation.Nullable - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Long id; - - public static final String SERIALIZED_NAME_RELEASE_KEY = "releaseKey"; - @SerializedName(SERIALIZED_NAME_RELEASE_KEY) - @javax.annotation.Nullable - private String releaseKey; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - @javax.annotation.Nullable - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - @javax.annotation.Nullable - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - @javax.annotation.Nullable - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - @javax.annotation.Nullable - private String namespaceName; - - public static final String SERIALIZED_NAME_CONFIGURATIONS = "configurations"; - @SerializedName(SERIALIZED_NAME_CONFIGURATIONS) - @javax.annotation.Nullable - private String configurations; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - @javax.annotation.Nullable - private String comment; - - public static final String SERIALIZED_NAME_IS_ABANDONED = "isAbandoned"; - @SerializedName(SERIALIZED_NAME_IS_ABANDONED) - @javax.annotation.Nullable - private Boolean isAbandoned; - - public ReleaseDTO() { - } - - public ReleaseDTO dataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@javax.annotation.Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public ReleaseDTO dataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@javax.annotation.Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public ReleaseDTO dataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@javax.annotation.Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public ReleaseDTO dataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@javax.annotation.Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public ReleaseDTO dataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@javax.annotation.Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public ReleaseDTO dataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@javax.annotation.Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public ReleaseDTO id(@javax.annotation.Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Long id) { - this.id = id; - } - - - public ReleaseDTO releaseKey(@javax.annotation.Nullable String releaseKey) { - this.releaseKey = releaseKey; - return this; - } - - /** - * - * @return releaseKey - */ - @javax.annotation.Nullable - public String getReleaseKey() { - return releaseKey; - } - - public void setReleaseKey(@javax.annotation.Nullable String releaseKey) { - this.releaseKey = releaseKey; - } - - - public ReleaseDTO name(@javax.annotation.Nullable String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(@javax.annotation.Nullable String name) { - this.name = name; - } - - - public ReleaseDTO appId(@javax.annotation.Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - public void setAppId(@javax.annotation.Nullable String appId) { - this.appId = appId; - } - - - public ReleaseDTO clusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - public void setClusterName(@javax.annotation.Nullable String clusterName) { - this.clusterName = clusterName; - } - - - public ReleaseDTO namespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@javax.annotation.Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - - public ReleaseDTO configurations(@javax.annotation.Nullable String configurations) { - this.configurations = configurations; - return this; - } - - /** - * - * @return configurations - */ - @javax.annotation.Nullable - public String getConfigurations() { - return configurations; - } - - public void setConfigurations(@javax.annotation.Nullable String configurations) { - this.configurations = configurations; - } - - - public ReleaseDTO comment(@javax.annotation.Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - public void setComment(@javax.annotation.Nullable String comment) { - this.comment = comment; - } - - - public ReleaseDTO isAbandoned(@javax.annotation.Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - return this; - } - - /** - * - * @return isAbandoned - */ - @javax.annotation.Nullable - public Boolean getIsAbandoned() { - return isAbandoned; - } - - public void setIsAbandoned(@javax.annotation.Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReleaseDTO releaseDTO = (ReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, releaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, releaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, releaseDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, releaseDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, releaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, releaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, releaseDTO.id) && - Objects.equals(this.releaseKey, releaseDTO.releaseKey) && - Objects.equals(this.name, releaseDTO.name) && - Objects.equals(this.appId, releaseDTO.appId) && - Objects.equals(this.clusterName, releaseDTO.clusterName) && - Objects.equals(this.namespaceName, releaseDTO.namespaceName) && - Objects.equals(this.configurations, releaseDTO.configurations) && - Objects.equals(this.comment, releaseDTO.comment) && - Objects.equals(this.isAbandoned, releaseDTO.isAbandoned); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, releaseKey, name, appId, clusterName, namespaceName, configurations, comment, isAbandoned); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" releaseKey: ").append(toIndentedString(releaseKey)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" isAbandoned: ").append(toIndentedString(isAbandoned)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "releaseKey", "name", "appId", "clusterName", "namespaceName", "configurations", "comment", "isAbandoned")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to ReleaseDTO - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!ReleaseDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ReleaseDTO is not found in the empty JSON string", ReleaseDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReleaseDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReleaseDTO` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedBy") != null && !jsonObj.get("dataChangeLastModifiedBy").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedBy").toString())); - } - if ((jsonObj.get("dataChangeCreatedByDisplayName") != null && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeCreatedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedByDisplayName") != null && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedByDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedByDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedByDisplayName").toString())); - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - if ((jsonObj.get("releaseKey") != null && !jsonObj.get("releaseKey").isJsonNull()) && !jsonObj.get("releaseKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseKey").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("configurations") != null && !jsonObj.get("configurations").isJsonNull()) && !jsonObj.get("configurations").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `configurations` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configurations").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReleaseDTO read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ReleaseDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of ReleaseDTO - * @throws IOException if the JSON string is invalid with respect to ReleaseDTO - */ - public static ReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ReleaseDTO.class); - } - - /** - * Convert an instance of ReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java deleted file mode 100644 index 4efb014..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.EnvClusterInfo; -import org.openapitools.client.model.OpenAppDTO; -import org.openapitools.client.model.OpenEnvClusterDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1AppsPost400Response; -import org.openapitools.client.model.OpenapiV1AppsPostRequest; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AppManagementApi - */ -@Disabled -public class AppManagementApiTest { - - private final AppManagementApi api = new AppManagementApi(); - - /** - * 删除AppNamespace - * - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteTest() throws ApiException { - String appId = null; - String namespaceName = null; - Object response = api.openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); - // TODO: test validations - } - - /** - * 删除应用 - * - * DELETE /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdDeleteTest() throws ApiException { - String appId = null; - OpenapiV1AppsGet401Response response = api.openapiV1AppsAppIdDelete(appId); - // TODO: test validations - } - - /** - * 获取应用的环境集群信息 - * - * GET /openapi/v1/apps/{appId}/env-clusters - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdEnvClustersGetTest() throws ApiException { - String appId = null; - List response = api.openapiV1AppsAppIdEnvClustersGet(appId); - // TODO: test validations - } - - /** - * 删除关联的Namespace - * - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Object response = api.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 获取单个应用信息 - * - * GET /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdGetTest() throws ApiException { - String appId = null; - OpenAppDTO response = api.openapiV1AppsAppIdGet(appId); - // TODO: test validations - } - - /** - * 查找缺失的环境 - * - * GET /openapi/v1/apps/{appId}/miss_envs - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdMissEnvsGetTest() throws ApiException { - String appId = null; - List response = api.openapiV1AppsAppIdMissEnvsGet(appId); - // TODO: test validations - } - - /** - * 获取应用下所有Namespace的发布状态 - * - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdNamespacesReleasesStatusGetTest() throws ApiException { - String appId = null; - Map> response = api.openapiV1AppsAppIdNamespacesReleasesStatusGet(appId); - // TODO: test validations - } - - /** - * 获取应用导航树 - * - * GET /openapi/v1/apps/{appId}/navtree - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdNavtreeGetTest() throws ApiException { - String appId = null; - List response = api.openapiV1AppsAppIdNavtreeGet(appId); - // TODO: test validations - } - - /** - * 更新应用 - * - * PUT /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdPutTest() throws ApiException { - String appId = null; - OpenAppDTO openAppDTO = null; - OpenAppDTO response = api.openapiV1AppsAppIdPut(appId, openAppDTO); - // TODO: test validations - } - - /** - * 获取当前Consumer的应用列表(分页) - * - * GET /openapi/v1/apps/by-self - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsBySelfGetTest() throws ApiException { - List response = api.openapiV1AppsBySelfGet(); - // TODO: test validations - } - - /** - * 在指定环境创建应用 - * - * POST /openapi/v1/apps/envs/{env} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsEnvsEnvPostTest() throws ApiException { - String env = null; - OpenAppDTO openAppDTO = null; - OpenapiV1AppsGet401Response response = api.openapiV1AppsEnvsEnvPost(env, openAppDTO); - // TODO: test validations - } - - /** - * 获取当前Consumer授权的应用列表 - * - * GET /openapi/v1/apps?authorized=true - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsGetTest() throws ApiException { - String authorized = null; - List response = api.openapiV1AppsGet(authorized); - // TODO: test validations - } - - /** - * 创建应用 - * - * POST /openapi/v1/apps - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsPostTest() throws ApiException { - OpenapiV1AppsPostRequest openapiV1AppsPostRequest = null; - OpenAppDTO response = api.openapiV1AppsPost(openapiV1AppsPostRequest); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java deleted file mode 100644 index bae4d48..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenClusterDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ClusterManagementApi - */ -@Disabled -public class ClusterManagementApiTest { - - private final ClusterManagementApi api = new ClusterManagementApi(); - - /** - * 获取指定集群信息 - * - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdClustersClusterNameGetTest() throws ApiException { - String appId = null; - String clusterName = null; - OpenClusterDTO response = api.openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName); - // TODO: test validations - } - - /** - * 创建集群 - * - * POST /openapi/v1/apps/{appId}/clusters - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdClustersPostTest() throws ApiException { - String appId = null; - OpenClusterDTO openClusterDTO = null; - OpenClusterDTO response = api.openapiV1AppsAppIdClustersPost(appId, openClusterDTO); - // TODO: test validations - } - - /** - * 删除集群 - * - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); - // TODO: test validations - } - - /** - * 获取命名空间分支信息 - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 获取指定的Namespace - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Boolean fillItemDetail = null; - OpenNamespaceDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail); - // TODO: test validations - } - -} 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 deleted file mode 100644 index ef098bd..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenInstanceDTO; -import org.openapitools.client.model.OpenPageDTOOpenInstanceDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for InstanceManagementApi - */ -@Disabled -public class InstanceManagementApiTest { - - private final InstanceManagementApi api = new InstanceManagementApi(); - - /** - * 获取命名空间下的实例数量 - * - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetTest() throws ApiException { - String appId = null; - String clusterName = null; - String namespaceName = null; - Integer response = api.openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 查询不在指定发布版本中的实例 - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String excludeReleases = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases); - // TODO: test validations - } - - /** - * 根据发布版本查询实例(支持分页) - * - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvReleasesReleaseIdInstancesGetTest() throws ApiException { - String env = null; - Integer releaseId = null; - Integer page = null; - Integer size = null; - OpenPageDTOOpenInstanceDTO response = api.openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java deleted file mode 100644 index 2e10ded..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ListItemDiffs; -import org.openapitools.client.model.NamespaceSyncModel; -import org.openapitools.client.model.NamespaceTextModel; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenPageDTOOpenItemDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ItemManagementApi - */ -@Disabled -public class ItemManagementApiTest { - - private final ItemManagementApi api = new ItemManagementApi(); - - /** - * 通过编码的key删除配置项 - * - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - String operator = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); - // TODO: test validations - } - - /** - * 通过查询参数获取配置项(支持编码的key) - * - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - OpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); - // TODO: test validations - } - - /** - * 通过编码的key更新配置项 - * - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - Boolean createIfNotExists = null; - OpenItemDTO openItemDTO = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - // TODO: test validations - } - - /** - * 通过文本批量修改配置项 - * - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - NamespaceTextModel namespaceTextModel = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel); - // TODO: test validations - } - - /** - * 对比命名空间配置差异 - * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - NamespaceSyncModel namespaceSyncModel = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel); - // TODO: test validations - } - - /** - * 获取命名空间下的配置项列表 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Integer page = null; - Integer size = null; - OpenPageDTOOpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); - // TODO: test validations - } - - /** - * 删除配置项 - * - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - String operator = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); - // TODO: test validations - } - - /** - * 获取单个配置项 - * - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - OpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); - // TODO: test validations - } - - /** - * 更新配置项 - * - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - Boolean createIfNotExists = null; - OpenItemDTO openItemDTO = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - // TODO: test validations - } - - /** - * 创建新的配置项 - * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenItemDTO openItemDTO = null; - OpenItemDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); - // TODO: test validations - } - - /** - * 撤销配置项更改 - * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 同步配置项到多个命名空间 - * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - NamespaceSyncModel namespaceSyncModel = null; - OpenapiV1AppsGet401Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel); - // TODO: test validations - } - - /** - * 验证配置文本语法 - * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - NamespaceTextModel namespaceTextModel = null; - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java deleted file mode 100644 index 6689566..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenGrayReleaseRuleDTO; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for NamespaceBranchManagementApi - */ -@Disabled -public class NamespaceBranchManagementApiTest { - - private final NamespaceBranchManagementApi api = new NamespaceBranchManagementApi(); - - /** - * 创建命名空间分支 - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String operator = null; - OpenNamespaceDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator); - // TODO: test validations - } - - /** - * 删除命名空间分支 - * - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - String operator = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator); - // TODO: test validations - } - - /** - * 创建灰度删除发布 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO); - // TODO: test validations - } - - /** - * 获取分支灰度发布规则 - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - OpenGrayReleaseRuleDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName); - // TODO: test validations - } - - /** - * 更新分支灰度发布规则 - * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - String operator = null; - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = null; - Object response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - // TODO: test validations - } - - /** - * 获取分支下的配置项 - * - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); - // TODO: test validations - } - - /** - * 合并分支 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - Boolean deleteBranch = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - // TODO: test validations - } - - /** - * 合并分支到主分支 - * - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - Boolean deleteBranch = null; - String xApolloOperator = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); - // TODO: test validations - } - - /** - * 创建灰度发布 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java deleted file mode 100644 index be615fc..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenAppNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceLockDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for NamespaceManagementApi - */ -@Disabled -public class NamespaceManagementApiTest { - - private final NamespaceManagementApi api = new NamespaceManagementApi(); - - /** - * 获取所有公共AppNamespace - * - * GET /openapi/v1/appnamespaces?public=true - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppnamespacesGetTest() throws ApiException { - Boolean publicOnly = null; - List response = api.openapiV1AppnamespacesGet(publicOnly); - // TODO: test validations - } - - /** - * 获取指定应用的AppNamespace - * - * GET /openapi/v1/apps/{appId}/appnamespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdAppnamespacesGetTest() throws ApiException { - String appId = null; - List response = api.openapiV1AppsAppIdAppnamespacesGet(appId); - // TODO: test validations - } - - /** - * 获取指定的AppNamespace - * - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdAppnamespacesNamespaceNameGetTest() throws ApiException { - String appId = null; - String namespaceName = null; - OpenAppNamespaceDTO response = api.openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName); - // TODO: test validations - } - - /** - * 创建AppNamespace - * - * POST /openapi/v1/apps/{appId}/appnamespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdAppnamespacesPostTest() throws ApiException { - String appId = null; - OpenAppNamespaceDTO openAppNamespaceDTO = null; - OpenAppNamespaceDTO response = api.openapiV1AppsAppIdAppnamespacesPost(appId, openAppNamespaceDTO); - // TODO: test validations - } - - /** - * 检查缺失的Namespace - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - List response = api.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName); - // TODO: test validations - } - - /** - * 获取关联的公共Namespace - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceDTO response = api.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 获取公共AppNamespace的所有实例 - * - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetTest() throws ApiException { - String env = null; - String publicNamespaceName = null; - Integer page = null; - Integer size = null; - List response = api.openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size); - // TODO: test validations - } - - /** - * 获取指定集群下的所有Namespace - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - Boolean fillItemDetail = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(appId, env, clusterName, fillItemDetail); - // TODO: test validations - } - - /** - * 获取Namespace的锁状态 - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceLockDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(appId, env, clusterName, namespaceName); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java deleted file mode 100644 index be68bb7..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenOrganizationDto; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for OrganizationManagementApi - */ -@Disabled -public class OrganizationManagementApiTest { - - private final OrganizationManagementApi api = new OrganizationManagementApi(); - - /** - * 获取所有组织信息 - * - * GET /openapi/v1/organizations - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1OrganizationsGetTest() throws ApiException { - List response = api.openapiV1OrganizationsGet(); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java deleted file mode 100644 index 916c770..0000000 --- a/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ListReleaseBO; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenapiV1AppsGet401Response; -import org.openapitools.client.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ReleaseManagementApi - */ -@Disabled -public class ReleaseManagementApiTest { - - private final ReleaseManagementApi api = new ReleaseManagementApi(); - - /** - * 获取活跃发布(分页) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Integer page = null; - Integer size = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size); - // TODO: test validations - } - - /** - * 获取所有发布(分页) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Integer page = null; - Integer size = null; - List response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size); - // TODO: test validations - } - - /** - * 获取最新活跃发布 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 创建发布 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO); - // TODO: test validations - } - - /** - * 对比发布 - * - * GET /openapi/v1/envs/{env}/releases/compare - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvReleasesCompareGetTest() throws ApiException { - String env = null; - Integer baseReleaseId = null; - Integer toCompareReleaseId = null; - OpenapiV1EnvsEnvReleasesCompareGet200Response response = api.openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId); - // TODO: test validations - } - - /** - * 获取发布详情 - * - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvReleasesReleaseIdGetTest() throws ApiException { - String env = null; - Integer releaseId = null; - OpenReleaseDTO response = api.openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId); - // TODO: test validations - } - - /** - * 回滚发布 - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void openapiV1EnvsEnvReleasesReleaseIdRollbackPutTest() throws ApiException { - String env = null; - Integer releaseId = null; - String operator = null; - Object response = api.openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ChangeTest.java b/java-client/src/test/java/org/openapitools/client/model/ChangeTest.java deleted file mode 100644 index 6991054..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ChangeTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.EntityPairKVEntity; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for Change - */ -public class ChangeTest { - private final Change model = new Change(); - - /** - * Model tests for Change - */ - @Test - public void testChange() { - // TODO: test Change - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'entity' - */ - @Test - public void entityTest() { - // TODO: test entity - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java deleted file mode 100644 index 188d905..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ClusterDTOTest.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ClusterDTO - */ -public class ClusterDTOTest { - private final ClusterDTO model = new ClusterDTO(); - - /** - * Model tests for ClusterDTO - */ - @Test - public void testClusterDTO() { - // TODO: test ClusterDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'parentClusterId' - */ - @Test - public void parentClusterIdTest() { - // TODO: test parentClusterId - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java deleted file mode 100644 index c868967..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/EntityPairKVEntityTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.KVEntity; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EntityPairKVEntity - */ -public class EntityPairKVEntityTest { - private final EntityPairKVEntity model = new EntityPairKVEntity(); - - /** - * Model tests for EntityPairKVEntity - */ - @Test - public void testEntityPairKVEntity() { - // TODO: test EntityPairKVEntity - } - - /** - * Test the property 'firstEntity' - */ - @Test - public void firstEntityTest() { - // TODO: test firstEntity - } - - /** - * Test the property 'secondEntity' - */ - @Test - public void secondEntityTest() { - // TODO: test secondEntity - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java b/java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java deleted file mode 100644 index 5331f25..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/EnvClusterInfoTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ClusterDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EnvClusterInfo - */ -public class EnvClusterInfoTest { - private final EnvClusterInfo model = new EnvClusterInfo(); - - /** - * Model tests for EnvClusterInfo - */ - @Test - public void testEnvClusterInfo() { - // TODO: test EnvClusterInfo - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusters' - */ - @Test - public void clustersTest() { - // TODO: test clusters - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java b/java-client/src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java deleted file mode 100644 index 4915680..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ItemChangeSetsTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ItemDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ItemChangeSets - */ -public class ItemChangeSetsTest { - private final ItemChangeSets model = new ItemChangeSets(); - - /** - * Model tests for ItemChangeSets - */ - @Test - public void testItemChangeSets() { - // TODO: test ItemChangeSets - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'createItems' - */ - @Test - public void createItemsTest() { - // TODO: test createItems - } - - /** - * Test the property 'updateItems' - */ - @Test - public void updateItemsTest() { - // TODO: test updateItems - } - - /** - * Test the property 'deleteItems' - */ - @Test - public void deleteItemsTest() { - // TODO: test deleteItems - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java deleted file mode 100644 index 7595e35..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ItemDTOTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ItemDTO - */ -public class ItemDTOTest { - private final ItemDTO model = new ItemDTO(); - - /** - * Model tests for ItemDTO - */ - @Test - public void testItemDTO() { - // TODO: test ItemDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'namespaceId' - */ - @Test - public void namespaceIdTest() { - // TODO: test namespaceId - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'lineNum' - */ - @Test - public void lineNumTest() { - // TODO: test lineNum - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java deleted file mode 100644 index 872bc58..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/KVEntityTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for KVEntity - */ -public class KVEntityTest { - private final KVEntity model = new KVEntity(); - - /** - * Model tests for KVEntity - */ - @Test - public void testKVEntity() { - // TODO: test KVEntity - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java b/java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java deleted file mode 100644 index c325aec..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ListItemDiffsTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.ItemChangeSets; -import org.openapitools.client.model.NamespaceIdentifier; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ListItemDiffs - */ -public class ListItemDiffsTest { - private final ListItemDiffs model = new ListItemDiffs(); - - /** - * Model tests for ListItemDiffs - */ - @Test - public void testListItemDiffs() { - // TODO: test ListItemDiffs - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - - /** - * Test the property 'diffs' - */ - @Test - public void diffsTest() { - // TODO: test diffs - } - - /** - * Test the property 'extInfo' - */ - @Test - public void extInfoTest() { - // TODO: test extInfo - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java b/java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java deleted file mode 100644 index 05a182a..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ListReleaseBOTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.KVEntity; -import org.openapitools.client.model.ReleaseDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ListReleaseBO - */ -public class ListReleaseBOTest { - private final ListReleaseBO model = new ListReleaseBO(); - - /** - * Model tests for ListReleaseBO - */ - @Test - public void testListReleaseBO() { - // TODO: test ListReleaseBO - } - - /** - * Test the property 'baseInfo' - */ - @Test - public void baseInfoTest() { - // TODO: test baseInfo - } - - /** - * Test the property 'items' - */ - @Test - public void itemsTest() { - // TODO: test items - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/MapStringTest.java b/java-client/src/test/java/org/openapitools/client/model/MapStringTest.java deleted file mode 100644 index 3a29f84..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/MapStringTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for MapString - */ -public class MapStringTest { - private final MapString model = new MapString(); - - /** - * Model tests for MapString - */ - @Test - public void testMapString() { - // TODO: test MapString - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java deleted file mode 100644 index 00f2b58..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NamespaceGrayDelReleaseDTO - */ -public class NamespaceGrayDelReleaseDTOTest { - private final NamespaceGrayDelReleaseDTO model = new NamespaceGrayDelReleaseDTO(); - - /** - * Model tests for NamespaceGrayDelReleaseDTO - */ - @Test - public void testNamespaceGrayDelReleaseDTO() { - // TODO: test NamespaceGrayDelReleaseDTO - } - - /** - * Test the property 'releaseTitle' - */ - @Test - public void releaseTitleTest() { - // TODO: test releaseTitle - } - - /** - * Test the property 'releaseComment' - */ - @Test - public void releaseCommentTest() { - // TODO: test releaseComment - } - - /** - * Test the property 'releasedBy' - */ - @Test - public void releasedByTest() { - // TODO: test releasedBy - } - - /** - * Test the property 'isEmergencyPublish' - */ - @Test - public void isEmergencyPublishTest() { - // TODO: test isEmergencyPublish - } - - /** - * Test the property 'grayDelKeys' - */ - @Test - public void grayDelKeysTest() { - // TODO: test grayDelKeys - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java deleted file mode 100644 index 50b24a5..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceIdentifierTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NamespaceIdentifier - */ -public class NamespaceIdentifierTest { - private final NamespaceIdentifier model = new NamespaceIdentifier(); - - /** - * Model tests for NamespaceIdentifier - */ - @Test - public void testNamespaceIdentifier() { - // TODO: test NamespaceIdentifier - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java deleted file mode 100644 index a5ec5c0..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NamespaceReleaseDTO - */ -public class NamespaceReleaseDTOTest { - private final NamespaceReleaseDTO model = new NamespaceReleaseDTO(); - - /** - * Model tests for NamespaceReleaseDTO - */ - @Test - public void testNamespaceReleaseDTO() { - // TODO: test NamespaceReleaseDTO - } - - /** - * Test the property 'releaseTitle' - */ - @Test - public void releaseTitleTest() { - // TODO: test releaseTitle - } - - /** - * Test the property 'releaseComment' - */ - @Test - public void releaseCommentTest() { - // TODO: test releaseComment - } - - /** - * Test the property 'releasedBy' - */ - @Test - public void releasedByTest() { - // TODO: test releasedBy - } - - /** - * Test the property 'isEmergencyPublish' - */ - @Test - public void isEmergencyPublishTest() { - // TODO: test isEmergencyPublish - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java deleted file mode 100644 index bd4e187..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceSyncModelTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ItemDTO; -import org.openapitools.client.model.NamespaceIdentifier; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NamespaceSyncModel - */ -public class NamespaceSyncModelTest { - private final NamespaceSyncModel model = new NamespaceSyncModel(); - - /** - * Model tests for NamespaceSyncModel - */ - @Test - public void testNamespaceSyncModel() { - // TODO: test NamespaceSyncModel - } - - /** - * Test the property 'syncToNamespaces' - */ - @Test - public void syncToNamespacesTest() { - // TODO: test syncToNamespaces - } - - /** - * Test the property 'syncItems' - */ - @Test - public void syncItemsTest() { - // TODO: test syncItems - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java deleted file mode 100644 index 97e1eaa..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceTextModelTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for NamespaceTextModel - */ -public class NamespaceTextModelTest { - private final NamespaceTextModel model = new NamespaceTextModel(); - - /** - * Model tests for NamespaceTextModel - */ - @Test - public void testNamespaceTextModel() { - // TODO: test NamespaceTextModel - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'namespaceId' - */ - @Test - public void namespaceIdTest() { - // TODO: test namespaceId - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'configText' - */ - @Test - public void configTextTest() { - // TODO: test configText - } - - /** - * Test the property 'operator' - */ - @Test - public void operatorTest() { - // TODO: test operator - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java deleted file mode 100644 index 7498a81..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenAppDTO - */ -public class OpenAppDTOTest { - private final OpenAppDTO model = new OpenAppDTO(); - - /** - * Model tests for OpenAppDTO - */ - @Test - public void testOpenAppDTO() { - // TODO: test OpenAppDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'orgId' - */ - @Test - public void orgIdTest() { - // TODO: test orgId - } - - /** - * Test the property 'orgName' - */ - @Test - public void orgNameTest() { - // TODO: test orgName - } - - /** - * Test the property 'ownerName' - */ - @Test - public void ownerNameTest() { - // TODO: test ownerName - } - - /** - * Test the property 'ownerEmail' - */ - @Test - public void ownerEmailTest() { - // TODO: test ownerEmail - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java deleted file mode 100644 index 79f4327..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenAppNamespaceDTO - */ -public class OpenAppNamespaceDTOTest { - private final OpenAppNamespaceDTO model = new OpenAppNamespaceDTO(); - - /** - * Model tests for OpenAppNamespaceDTO - */ - @Test - public void testOpenAppNamespaceDTO() { - // TODO: test OpenAppNamespaceDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'isPublic' - */ - @Test - public void isPublicTest() { - // TODO: test isPublic - } - - /** - * Test the property 'appendNamespacePrefix' - */ - @Test - public void appendNamespacePrefixTest() { - // TODO: test appendNamespacePrefix - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java deleted file mode 100644 index ce4ef14..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenClusterDTO - */ -public class OpenClusterDTOTest { - private final OpenClusterDTO model = new OpenClusterDTO(); - - /** - * Model tests for OpenClusterDTO - */ - @Test - public void testOpenClusterDTO() { - // TODO: test OpenClusterDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java deleted file mode 100644 index 554358c..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenAppDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenCreateAppDTO - */ -public class OpenCreateAppDTOTest { - private final OpenCreateAppDTO model = new OpenCreateAppDTO(); - - /** - * Model tests for OpenCreateAppDTO - */ - @Test - public void testOpenCreateAppDTO() { - // TODO: test OpenCreateAppDTO - } - - /** - * Test the property 'assignAppRoleToSelf' - */ - @Test - public void assignAppRoleToSelfTest() { - // TODO: test assignAppRoleToSelf - } - - /** - * Test the property 'admins' - */ - @Test - public void adminsTest() { - // TODO: test admins - } - - /** - * Test the property 'app' - */ - @Test - public void appTest() { - // TODO: test app - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java deleted file mode 100644 index 69d2cd2..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenEnvClusterDTO - */ -public class OpenEnvClusterDTOTest { - private final OpenEnvClusterDTO model = new OpenEnvClusterDTO(); - - /** - * Model tests for OpenEnvClusterDTO - */ - @Test - public void testOpenEnvClusterDTO() { - // TODO: test OpenEnvClusterDTO - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusters' - */ - @Test - public void clustersTest() { - // TODO: test clusters - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java deleted file mode 100644 index a1d7692..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenGrayReleaseRuleDTO - */ -public class OpenGrayReleaseRuleDTOTest { - private final OpenGrayReleaseRuleDTO model = new OpenGrayReleaseRuleDTO(); - - /** - * Model tests for OpenGrayReleaseRuleDTO - */ - @Test - public void testOpenGrayReleaseRuleDTO() { - // TODO: test OpenGrayReleaseRuleDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'branchName' - */ - @Test - public void branchNameTest() { - // TODO: test branchName - } - - /** - * Test the property 'ruleItems' - */ - @Test - public void ruleItemsTest() { - // TODO: test ruleItems - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java deleted file mode 100644 index 7908e29..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenGrayReleaseRuleItemDTO - */ -public class OpenGrayReleaseRuleItemDTOTest { - private final OpenGrayReleaseRuleItemDTO model = new OpenGrayReleaseRuleItemDTO(); - - /** - * Model tests for OpenGrayReleaseRuleItemDTO - */ - @Test - public void testOpenGrayReleaseRuleItemDTO() { - // TODO: test OpenGrayReleaseRuleItemDTO - } - - /** - * Test the property 'clientAppId' - */ - @Test - public void clientAppIdTest() { - // TODO: test clientAppId - } - - /** - * Test the property 'clientIpList' - */ - @Test - public void clientIpListTest() { - // TODO: test clientIpList - } - - /** - * Test the property 'clientLabelList' - */ - @Test - public void clientLabelListTest() { - // TODO: test clientLabelList - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java deleted file mode 100644 index 388e8bc..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.OpenReleaseDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenInstanceConfigDTO - */ -public class OpenInstanceConfigDTOTest { - private final OpenInstanceConfigDTO model = new OpenInstanceConfigDTO(); - - /** - * Model tests for OpenInstanceConfigDTO - */ - @Test - public void testOpenInstanceConfigDTO() { - // TODO: test OpenInstanceConfigDTO - } - - /** - * Test the property 'release' - */ - @Test - public void releaseTest() { - // TODO: test release - } - - /** - * Test the property 'releaseDeliveryTime' - */ - @Test - public void releaseDeliveryTimeTest() { - // TODO: test releaseDeliveryTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java deleted file mode 100644 index ff84990..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenInstanceConfigDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenInstanceDTO - */ -public class OpenInstanceDTOTest { - private final OpenInstanceDTO model = new OpenInstanceDTO(); - - /** - * Model tests for OpenInstanceDTO - */ - @Test - public void testOpenInstanceDTO() { - // TODO: test OpenInstanceDTO - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'dataCenter' - */ - @Test - public void dataCenterTest() { - // TODO: test dataCenter - } - - /** - * Test the property 'ip' - */ - @Test - public void ipTest() { - // TODO: test ip - } - - /** - * Test the property 'configs' - */ - @Test - public void configsTest() { - // TODO: test configs - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java deleted file mode 100644 index c975e48..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenItemDTO - */ -public class OpenItemDTOTest { - private final OpenItemDTO model = new OpenItemDTO(); - - /** - * Model tests for OpenItemDTO - */ - @Test - public void testOpenItemDTO() { - // TODO: test OpenItemDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java deleted file mode 100644 index b04ceb5..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenNamespaceDTO - */ -public class OpenNamespaceDTOTest { - private final OpenNamespaceDTO model = new OpenNamespaceDTO(); - - /** - * Model tests for OpenNamespaceDTO - */ - @Test - public void testOpenNamespaceDTO() { - // TODO: test OpenNamespaceDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'isPublic' - */ - @Test - public void isPublicTest() { - // TODO: test isPublic - } - - /** - * Test the property 'items' - */ - @Test - public void itemsTest() { - // TODO: test items - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java deleted file mode 100644 index 03b3281..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenNamespaceLockDTO - */ -public class OpenNamespaceLockDTOTest { - private final OpenNamespaceLockDTO model = new OpenNamespaceLockDTO(); - - /** - * Model tests for OpenNamespaceLockDTO - */ - @Test - public void testOpenNamespaceLockDTO() { - // TODO: test OpenNamespaceLockDTO - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'isLocked' - */ - @Test - public void isLockedTest() { - // TODO: test isLocked - } - - /** - * Test the property 'lockedBy' - */ - @Test - public void lockedByTest() { - // TODO: test lockedBy - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java deleted file mode 100644 index 6c49d82..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenOrganizationDto - */ -public class OpenOrganizationDtoTest { - private final OpenOrganizationDto model = new OpenOrganizationDto(); - - /** - * Model tests for OpenOrganizationDto - */ - @Test - public void testOpenOrganizationDto() { - // TODO: test OpenOrganizationDto - } - - /** - * Test the property 'orgId' - */ - @Test - public void orgIdTest() { - // TODO: test orgId - } - - /** - * Test the property 'orgName' - */ - @Test - public void orgNameTest() { - // TODO: test orgName - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java deleted file mode 100644 index becdcc7..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenInstanceDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenPageDTOOpenInstanceDTO - */ -public class OpenPageDTOOpenInstanceDTOTest { - private final OpenPageDTOOpenInstanceDTO model = new OpenPageDTOOpenInstanceDTO(); - - /** - * Model tests for OpenPageDTOOpenInstanceDTO - */ - @Test - public void testOpenPageDTOOpenInstanceDTO() { - // TODO: test OpenPageDTOOpenInstanceDTO - } - - /** - * Test the property 'page' - */ - @Test - public void pageTest() { - // TODO: test page - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'content' - */ - @Test - public void contentTest() { - // TODO: test content - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java deleted file mode 100644 index 80165b7..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenPageDTOOpenItemDTO - */ -public class OpenPageDTOOpenItemDTOTest { - private final OpenPageDTOOpenItemDTO model = new OpenPageDTOOpenItemDTO(); - - /** - * Model tests for OpenPageDTOOpenItemDTO - */ - @Test - public void testOpenPageDTOOpenItemDTO() { - // TODO: test OpenPageDTOOpenItemDTO - } - - /** - * Test the property 'page' - */ - @Test - public void pageTest() { - // TODO: test page - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'content' - */ - @Test - public void contentTest() { - // TODO: test content - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java deleted file mode 100644 index 7268515..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.openapitools.client.model.MapString; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenReleaseDTO - */ -public class OpenReleaseDTOTest { - private final OpenReleaseDTO model = new OpenReleaseDTO(); - - /** - * Model tests for OpenReleaseDTO - */ - @Test - public void testOpenReleaseDTO() { - // TODO: test OpenReleaseDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'configurations' - */ - @Test - public void configurationsTest() { - // TODO: test configurations - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java deleted file mode 100644 index 2dffa54..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsGet401ResponseTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1AppsGet401Response - */ -public class OpenapiV1AppsGet401ResponseTest { - private final OpenapiV1AppsGet401Response model = new OpenapiV1AppsGet401Response(); - - /** - * Model tests for OpenapiV1AppsGet401Response - */ - @Test - public void testOpenapiV1AppsGet401Response() { - // TODO: test OpenapiV1AppsGet401Response - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java deleted file mode 100644 index ce91f98..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPost400ResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1AppsPost400Response - */ -public class OpenapiV1AppsPost400ResponseTest { - private final OpenapiV1AppsPost400Response model = new OpenapiV1AppsPost400Response(); - - /** - * Model tests for OpenapiV1AppsPost400Response - */ - @Test - public void testOpenapiV1AppsPost400Response() { - // TODO: test OpenapiV1AppsPost400Response - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'exception' - */ - @Test - public void exceptionTest() { - // TODO: test exception - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java deleted file mode 100644 index 664ec29..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1AppsPostRequestTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.OpenAppDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1AppsPostRequest - */ -public class OpenapiV1AppsPostRequestTest { - private final OpenapiV1AppsPostRequest model = new OpenapiV1AppsPostRequest(); - - /** - * Model tests for OpenapiV1AppsPostRequest - */ - @Test - public void testOpenapiV1AppsPostRequest() { - // TODO: test OpenapiV1AppsPostRequest - } - - /** - * Test the property 'assignAppRoleToSelf' - */ - @Test - public void assignAppRoleToSelfTest() { - // TODO: test assignAppRoleToSelf - } - - /** - * Test the property 'admins' - */ - @Test - public void adminsTest() { - // TODO: test admins - } - - /** - * Test the property 'app' - */ - @Test - public void appTest() { - // TODO: test app - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java deleted file mode 100644 index be3e25a..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseTest { - private final OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response model = new OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(); - - /** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - @Test - public void testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response() { - // TODO: test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - } - - /** - * Test the property 'valid' - */ - @Test - public void validTest() { - // TODO: test valid - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java deleted file mode 100644 index 7641de2..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseTest { - private final OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response model = new OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(); - - /** - * Model tests for OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - @Test - public void testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response() { - // TODO: test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - } - - /** - * Test the property 'valid' - */ - @Test - public void validTest() { - // TODO: test valid - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'errors' - */ - @Test - public void errorsTest() { - // TODO: test errors - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java deleted file mode 100644 index 52e2ef0..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.Change; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for OpenapiV1EnvsEnvReleasesCompareGet200Response - */ -public class OpenapiV1EnvsEnvReleasesCompareGet200ResponseTest { - private final OpenapiV1EnvsEnvReleasesCompareGet200Response model = new OpenapiV1EnvsEnvReleasesCompareGet200Response(); - - /** - * Model tests for OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - @Test - public void testOpenapiV1EnvsEnvReleasesCompareGet200Response() { - // TODO: test OpenapiV1EnvsEnvReleasesCompareGet200Response - } - - /** - * Test the property 'changes' - */ - @Test - public void changesTest() { - // TODO: test changes - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java deleted file mode 100644 index b5c4b4a..0000000 --- a/java-client/src/test/java/org/openapitools/client/model/ReleaseDTOTest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.Arrays; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for ReleaseDTO - */ -public class ReleaseDTOTest { - private final ReleaseDTO model = new ReleaseDTO(); - - /** - * Model tests for ReleaseDTO - */ - @Test - public void testReleaseDTO() { - // TODO: test ReleaseDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedByDisplayName' - */ - @Test - public void dataChangeLastModifiedByDisplayNameTest() { - // TODO: test dataChangeLastModifiedByDisplayName - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'releaseKey' - */ - @Test - public void releaseKeyTest() { - // TODO: test releaseKey - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'configurations' - */ - @Test - public void configurationsTest() { - // TODO: test configurations - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'isAbandoned' - */ - @Test - public void isAbandonedTest() { - // TODO: test isAbandoned - } - -} diff --git a/python/.github/workflows/python.yml b/python/.github/workflows/python.yml deleted file mode 100644 index 3619e40..0000000 --- a/python/.github/workflows/python.yml +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: apollo_openapi Python package - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - name: Test with pytest - run: | - pytest --cov=apollo_openapi diff --git a/python/.gitignore b/python/.gitignore deleted file mode 100644 index 43995bd..0000000 --- a/python/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/python/.gitlab-ci.yml b/python/.gitlab-ci.yml deleted file mode 100644 index 718cf23..0000000 --- a/python/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=apollo_openapi - -pytest-3.9: - extends: .pytest - image: python:3.9-alpine -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine -pytest-3.12: - extends: .pytest - image: python:3.12-alpine -pytest-3.13: - extends: .pytest - image: python:3.13-alpine diff --git a/python/.openapi-generator-ignore b/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES deleted file mode 100644 index 4ba58cc..0000000 --- a/python/.openapi-generator/FILES +++ /dev/null @@ -1,161 +0,0 @@ -.github/workflows/python.yml -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -apollo_openapi/__init__.py -apollo_openapi/api/__init__.py -apollo_openapi/api/app_management_api.py -apollo_openapi/api/cluster_management_api.py -apollo_openapi/api/instance_management_api.py -apollo_openapi/api/item_management_api.py -apollo_openapi/api/namespace_branch_management_api.py -apollo_openapi/api/namespace_management_api.py -apollo_openapi/api/organization_management_api.py -apollo_openapi/api/release_management_api.py -apollo_openapi/api_client.py -apollo_openapi/api_response.py -apollo_openapi/configuration.py -apollo_openapi/exceptions.py -apollo_openapi/models/__init__.py -apollo_openapi/models/change.py -apollo_openapi/models/cluster_dto.py -apollo_openapi/models/entity_pair_kv_entity.py -apollo_openapi/models/env_cluster_info.py -apollo_openapi/models/item_change_sets.py -apollo_openapi/models/item_dto.py -apollo_openapi/models/kv_entity.py -apollo_openapi/models/list_item_diffs.py -apollo_openapi/models/list_release_bo.py -apollo_openapi/models/map_string.py -apollo_openapi/models/namespace_gray_del_release_dto.py -apollo_openapi/models/namespace_identifier.py -apollo_openapi/models/namespace_release_dto.py -apollo_openapi/models/namespace_sync_model.py -apollo_openapi/models/namespace_text_model.py -apollo_openapi/models/open_app_dto.py -apollo_openapi/models/open_app_namespace_dto.py -apollo_openapi/models/open_cluster_dto.py -apollo_openapi/models/open_create_app_dto.py -apollo_openapi/models/open_env_cluster_dto.py -apollo_openapi/models/open_gray_release_rule_dto.py -apollo_openapi/models/open_gray_release_rule_item_dto.py -apollo_openapi/models/open_instance_config_dto.py -apollo_openapi/models/open_instance_dto.py -apollo_openapi/models/open_item_dto.py -apollo_openapi/models/open_namespace_dto.py -apollo_openapi/models/open_namespace_lock_dto.py -apollo_openapi/models/open_organization_dto.py -apollo_openapi/models/open_page_dto_open_instance_dto.py -apollo_openapi/models/open_page_dto_open_item_dto.py -apollo_openapi/models/open_release_dto.py -apollo_openapi/models/openapi_v1_apps_get401_response.py -apollo_openapi/models/openapi_v1_apps_post400_response.py -apollo_openapi/models/openapi_v1_apps_post_request.py -apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py -apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py -apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py -apollo_openapi/models/release_dto.py -apollo_openapi/py.typed -apollo_openapi/rest.py -docs/AppManagementApi.md -docs/Change.md -docs/ClusterDTO.md -docs/ClusterManagementApi.md -docs/EntityPairKVEntity.md -docs/EnvClusterInfo.md -docs/InstanceManagementApi.md -docs/ItemChangeSets.md -docs/ItemDTO.md -docs/ItemManagementApi.md -docs/KVEntity.md -docs/ListItemDiffs.md -docs/ListReleaseBO.md -docs/MapString.md -docs/NamespaceBranchManagementApi.md -docs/NamespaceGrayDelReleaseDTO.md -docs/NamespaceIdentifier.md -docs/NamespaceManagementApi.md -docs/NamespaceReleaseDTO.md -docs/NamespaceSyncModel.md -docs/NamespaceTextModel.md -docs/OpenAppDTO.md -docs/OpenAppNamespaceDTO.md -docs/OpenClusterDTO.md -docs/OpenCreateAppDTO.md -docs/OpenEnvClusterDTO.md -docs/OpenGrayReleaseRuleDTO.md -docs/OpenGrayReleaseRuleItemDTO.md -docs/OpenInstanceConfigDTO.md -docs/OpenInstanceDTO.md -docs/OpenItemDTO.md -docs/OpenNamespaceDTO.md -docs/OpenNamespaceLockDTO.md -docs/OpenOrganizationDto.md -docs/OpenPageDTOOpenInstanceDTO.md -docs/OpenPageDTOOpenItemDTO.md -docs/OpenReleaseDTO.md -docs/OpenapiV1AppsGet401Response.md -docs/OpenapiV1AppsPost400Response.md -docs/OpenapiV1AppsPostRequest.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md -docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md -docs/OrganizationManagementApi.md -docs/ReleaseDTO.md -docs/ReleaseManagementApi.md -git_push.sh -pyproject.toml -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_app_management_api.py -test/test_change.py -test/test_cluster_dto.py -test/test_cluster_management_api.py -test/test_entity_pair_kv_entity.py -test/test_env_cluster_info.py -test/test_instance_management_api.py -test/test_item_change_sets.py -test/test_item_dto.py -test/test_item_management_api.py -test/test_kv_entity.py -test/test_list_item_diffs.py -test/test_list_release_bo.py -test/test_map_string.py -test/test_namespace_branch_management_api.py -test/test_namespace_gray_del_release_dto.py -test/test_namespace_identifier.py -test/test_namespace_management_api.py -test/test_namespace_release_dto.py -test/test_namespace_sync_model.py -test/test_namespace_text_model.py -test/test_open_app_dto.py -test/test_open_app_namespace_dto.py -test/test_open_cluster_dto.py -test/test_open_create_app_dto.py -test/test_open_env_cluster_dto.py -test/test_open_gray_release_rule_dto.py -test/test_open_gray_release_rule_item_dto.py -test/test_open_instance_config_dto.py -test/test_open_instance_dto.py -test/test_open_item_dto.py -test/test_open_namespace_dto.py -test/test_open_namespace_lock_dto.py -test/test_open_organization_dto.py -test/test_open_page_dto_open_instance_dto.py -test/test_open_page_dto_open_item_dto.py -test/test_open_release_dto.py -test/test_openapi_v1_apps_get401_response.py -test/test_openapi_v1_apps_post400_response.py -test/test_openapi_v1_apps_post_request.py -test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py -test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py -test/test_openapi_v1_envs_env_releases_compare_get200_response.py -test/test_organization_management_api.py -test/test_release_dto.py -test/test_release_management_api.py -tox.ini diff --git a/python/.openapi-generator/VERSION b/python/.openapi-generator/VERSION deleted file mode 100644 index 368fd8f..0000000 --- a/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.15.0 diff --git a/python/.travis.yml b/python/.travis.yml deleted file mode 100644 index 2a6931a..0000000 --- a/python/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - "3.13" - # uncomment the following if needed - #- "3.13-dev" # 3.13 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=apollo_openapi diff --git a/python/README.md b/python/README.md deleted file mode 100644 index 7da6390..0000000 --- a/python/README.md +++ /dev/null @@ -1,248 +0,0 @@ -# apollo-openapi -Apollo配置中心OpenAPI接口文档 - -## 认证方式 - -所有API接口都需要通过Authorization header进行身份验证。 - -### 获取Token的方式: - -1. **Portal管理界面获取**: - - 登录Apollo Portal管理界面 - - 进入\"管理员工具\" -> \"开放平台授权管理\" - - 创建第三方应用,获取Token - -2. **Token格式**: - ``` - Authorization: token_value - ``` - -3. **Token权限**: - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - -### 使用示例: -```bash -curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ - -H \"Authorization: your_token_here\" -``` - - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 0.0.1 -- Generator version: 7.15.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python 3.9+ - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import apollo_openapi -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import apollo_openapi -``` - -### Tests - -Execute `pytest` to run the tests. - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 删除AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(app_id, namespace_name) - print("The response of AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AppManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_namespace_name_delete**](docs/AppManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_delete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace -*AppManagementApi* | [**openapi_v1_apps_app_id_delete**](docs/AppManagementApi.md#openapi_v1_apps_app_id_delete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 -*AppManagementApi* | [**openapi_v1_apps_app_id_env_clusters_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_env_clusters_get) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 -*AppManagementApi* | [**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete**](docs/AppManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace -*AppManagementApi* | [**openapi_v1_apps_app_id_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_get) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 -*AppManagementApi* | [**openapi_v1_apps_app_id_miss_envs_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_miss_envs_get) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 -*AppManagementApi* | [**openapi_v1_apps_app_id_namespaces_releases_status_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_namespaces_releases_status_get) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 -*AppManagementApi* | [**openapi_v1_apps_app_id_navtree_get**](docs/AppManagementApi.md#openapi_v1_apps_app_id_navtree_get) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 -*AppManagementApi* | [**openapi_v1_apps_app_id_put**](docs/AppManagementApi.md#openapi_v1_apps_app_id_put) | **PUT** /openapi/v1/apps/{appId} | 更新应用 -*AppManagementApi* | [**openapi_v1_apps_by_self_get**](docs/AppManagementApi.md#openapi_v1_apps_by_self_get) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) -*AppManagementApi* | [**openapi_v1_apps_envs_env_post**](docs/AppManagementApi.md#openapi_v1_apps_envs_env_post) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 -*AppManagementApi* | [**openapi_v1_apps_get**](docs/AppManagementApi.md#openapi_v1_apps_get) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 -*AppManagementApi* | [**openapi_v1_apps_post**](docs/AppManagementApi.md#openapi_v1_apps_post) | **POST** /openapi/v1/apps | 创建应用 -*ClusterManagementApi* | [**openapi_v1_apps_app_id_clusters_cluster_name_get**](docs/ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 -*ClusterManagementApi* | [**openapi_v1_apps_app_id_clusters_post**](docs/ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_post) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 -*ClusterManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete**](docs/ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 -*ClusterManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get**](docs/ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 -*ClusterManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get**](docs/ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace -*InstanceManagementApi* | [**openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](docs/InstanceManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 -*InstanceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](docs/InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 -*InstanceManagementApi* | [**openapi_v1_envs_env_releases_release_id_instances_get**](docs/InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 -*ItemManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post**](docs/ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 -*NamespaceBranchManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post**](docs/NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 -*NamespaceManagementApi* | [**openapi_v1_appnamespaces_get**](docs/NamespaceManagementApi.md#openapi_v1_appnamespaces_get) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_namespace_name_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_appnamespaces_post**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_post) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace -*NamespaceManagementApi* | [**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get**](docs/NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace -*NamespaceManagementApi* | [**openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get**](docs/NamespaceManagementApi.md#openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 -*NamespaceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get**](docs/NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace -*NamespaceManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get**](docs/NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 -*OrganizationManagementApi* | [**openapi_v1_organizations_get**](docs/OrganizationManagementApi.md#openapi_v1_organizations_get) | **GET** /openapi/v1/organizations | 获取所有组织信息 -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active | 获取活跃发布(分页) -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 -*ReleaseManagementApi* | [**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 -*ReleaseManagementApi* | [**openapi_v1_envs_env_releases_compare_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_releases_compare_get) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 -*ReleaseManagementApi* | [**openapi_v1_envs_env_releases_release_id_get**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 -*ReleaseManagementApi* | [**openapi_v1_envs_env_releases_release_id_rollback_put**](docs/ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_rollback_put) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 - - -## Documentation For Models - - - [Change](docs/Change.md) - - [ClusterDTO](docs/ClusterDTO.md) - - [EntityPairKVEntity](docs/EntityPairKVEntity.md) - - [EnvClusterInfo](docs/EnvClusterInfo.md) - - [ItemChangeSets](docs/ItemChangeSets.md) - - [ItemDTO](docs/ItemDTO.md) - - [KVEntity](docs/KVEntity.md) - - [ListItemDiffs](docs/ListItemDiffs.md) - - [ListReleaseBO](docs/ListReleaseBO.md) - - [MapString](docs/MapString.md) - - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) - - [NamespaceIdentifier](docs/NamespaceIdentifier.md) - - [NamespaceReleaseDTO](docs/NamespaceReleaseDTO.md) - - [NamespaceSyncModel](docs/NamespaceSyncModel.md) - - [NamespaceTextModel](docs/NamespaceTextModel.md) - - [OpenAppDTO](docs/OpenAppDTO.md) - - [OpenAppNamespaceDTO](docs/OpenAppNamespaceDTO.md) - - [OpenClusterDTO](docs/OpenClusterDTO.md) - - [OpenCreateAppDTO](docs/OpenCreateAppDTO.md) - - [OpenEnvClusterDTO](docs/OpenEnvClusterDTO.md) - - [OpenGrayReleaseRuleDTO](docs/OpenGrayReleaseRuleDTO.md) - - [OpenGrayReleaseRuleItemDTO](docs/OpenGrayReleaseRuleItemDTO.md) - - [OpenInstanceConfigDTO](docs/OpenInstanceConfigDTO.md) - - [OpenInstanceDTO](docs/OpenInstanceDTO.md) - - [OpenItemDTO](docs/OpenItemDTO.md) - - [OpenNamespaceDTO](docs/OpenNamespaceDTO.md) - - [OpenNamespaceLockDTO](docs/OpenNamespaceLockDTO.md) - - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPageDTOOpenInstanceDTO](docs/OpenPageDTOOpenInstanceDTO.md) - - [OpenPageDTOOpenItemDTO](docs/OpenPageDTOOpenItemDTO.md) - - [OpenReleaseDTO](docs/OpenReleaseDTO.md) - - [OpenapiV1AppsGet401Response](docs/OpenapiV1AppsGet401Response.md) - - [OpenapiV1AppsPost400Response](docs/OpenapiV1AppsPost400Response.md) - - [OpenapiV1AppsPostRequest](docs/OpenapiV1AppsPostRequest.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md) - - [OpenapiV1EnvsEnvReleasesCompareGet200Response](docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - - [ReleaseDTO](docs/ReleaseDTO.md) - - - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### ApiKeyAuth - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - - -## Author - - - - diff --git a/python/apollo_openapi/__init__.py b/python/apollo_openapi/__init__.py deleted file mode 100644 index dfc6915..0000000 --- a/python/apollo_openapi/__init__.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "0.0.1" - -# Define package exports -__all__ = [ - "AppManagementApi", - "ClusterManagementApi", - "InstanceManagementApi", - "ItemManagementApi", - "NamespaceBranchManagementApi", - "NamespaceManagementApi", - "OrganizationManagementApi", - "ReleaseManagementApi", - "ApiResponse", - "ApiClient", - "Configuration", - "OpenApiException", - "ApiTypeError", - "ApiValueError", - "ApiKeyError", - "ApiAttributeError", - "ApiException", - "Change", - "ClusterDTO", - "EntityPairKVEntity", - "EnvClusterInfo", - "ItemChangeSets", - "ItemDTO", - "KVEntity", - "ListItemDiffs", - "ListReleaseBO", - "MapString", - "NamespaceGrayDelReleaseDTO", - "NamespaceIdentifier", - "NamespaceReleaseDTO", - "NamespaceSyncModel", - "NamespaceTextModel", - "OpenAppDTO", - "OpenAppNamespaceDTO", - "OpenClusterDTO", - "OpenCreateAppDTO", - "OpenEnvClusterDTO", - "OpenGrayReleaseRuleDTO", - "OpenGrayReleaseRuleItemDTO", - "OpenInstanceConfigDTO", - "OpenInstanceDTO", - "OpenItemDTO", - "OpenNamespaceDTO", - "OpenNamespaceLockDTO", - "OpenOrganizationDto", - "OpenPageDTOOpenInstanceDTO", - "OpenPageDTOOpenItemDTO", - "OpenReleaseDTO", - "OpenapiV1AppsGet401Response", - "OpenapiV1AppsPost400Response", - "OpenapiV1AppsPostRequest", - "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - "OpenapiV1EnvsEnvReleasesCompareGet200Response", - "ReleaseDTO", -] - -if __import__("typing").TYPE_CHECKING: - # import apis into sdk package - from apollo_openapi.api.app_management_api import AppManagementApi as AppManagementApi - from apollo_openapi.api.cluster_management_api import ClusterManagementApi as ClusterManagementApi - from apollo_openapi.api.instance_management_api import InstanceManagementApi as InstanceManagementApi - from apollo_openapi.api.item_management_api import ItemManagementApi as ItemManagementApi - from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi as NamespaceBranchManagementApi - from apollo_openapi.api.namespace_management_api import NamespaceManagementApi as NamespaceManagementApi - from apollo_openapi.api.organization_management_api import OrganizationManagementApi as OrganizationManagementApi - from apollo_openapi.api.release_management_api import ReleaseManagementApi as ReleaseManagementApi - - # import ApiClient - from apollo_openapi.api_response import ApiResponse as ApiResponse - from apollo_openapi.api_client import ApiClient as ApiClient - from apollo_openapi.configuration import Configuration as Configuration - from apollo_openapi.exceptions import OpenApiException as OpenApiException - from apollo_openapi.exceptions import ApiTypeError as ApiTypeError - from apollo_openapi.exceptions import ApiValueError as ApiValueError - from apollo_openapi.exceptions import ApiKeyError as ApiKeyError - from apollo_openapi.exceptions import ApiAttributeError as ApiAttributeError - from apollo_openapi.exceptions import ApiException as ApiException - - # import models into sdk package - from apollo_openapi.models.change import Change as Change - from apollo_openapi.models.cluster_dto import ClusterDTO as ClusterDTO - from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity as EntityPairKVEntity - from apollo_openapi.models.env_cluster_info import EnvClusterInfo as EnvClusterInfo - from apollo_openapi.models.item_change_sets import ItemChangeSets as ItemChangeSets - from apollo_openapi.models.item_dto import ItemDTO as ItemDTO - from apollo_openapi.models.kv_entity import KVEntity as KVEntity - from apollo_openapi.models.list_item_diffs import ListItemDiffs as ListItemDiffs - from apollo_openapi.models.list_release_bo import ListReleaseBO as ListReleaseBO - from apollo_openapi.models.map_string import MapString as MapString - from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO as NamespaceGrayDelReleaseDTO - from apollo_openapi.models.namespace_identifier import NamespaceIdentifier as NamespaceIdentifier - from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO as NamespaceReleaseDTO - from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel as NamespaceSyncModel - from apollo_openapi.models.namespace_text_model import NamespaceTextModel as NamespaceTextModel - from apollo_openapi.models.open_app_dto import OpenAppDTO as OpenAppDTO - from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO as OpenAppNamespaceDTO - from apollo_openapi.models.open_cluster_dto import OpenClusterDTO as OpenClusterDTO - from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO as OpenCreateAppDTO - from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO as OpenEnvClusterDTO - from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO as OpenGrayReleaseRuleDTO - from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO as OpenGrayReleaseRuleItemDTO - from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO as OpenInstanceConfigDTO - from apollo_openapi.models.open_instance_dto import OpenInstanceDTO as OpenInstanceDTO - from apollo_openapi.models.open_item_dto import OpenItemDTO as OpenItemDTO - from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO as OpenNamespaceDTO - from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO as OpenNamespaceLockDTO - from apollo_openapi.models.open_organization_dto import OpenOrganizationDto as OpenOrganizationDto - from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO as OpenPageDTOOpenInstanceDTO - from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO as OpenPageDTOOpenItemDTO - from apollo_openapi.models.open_release_dto import OpenReleaseDTO as OpenReleaseDTO - from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response as OpenapiV1AppsGet401Response - from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response as OpenapiV1AppsPost400Response - from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest as OpenapiV1AppsPostRequest - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response as OpenapiV1EnvsEnvReleasesCompareGet200Response - from apollo_openapi.models.release_dto import ReleaseDTO as ReleaseDTO - -else: - from lazy_imports import LazyModule, as_package, load - - load( - LazyModule( - *as_package(__file__), - ("__version__", __version__), - ("__all__", __all__), - """# import apis into sdk package -from apollo_openapi.api.app_management_api import AppManagementApi as AppManagementApi -from apollo_openapi.api.cluster_management_api import ClusterManagementApi as ClusterManagementApi -from apollo_openapi.api.instance_management_api import InstanceManagementApi as InstanceManagementApi -from apollo_openapi.api.item_management_api import ItemManagementApi as ItemManagementApi -from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi as NamespaceBranchManagementApi -from apollo_openapi.api.namespace_management_api import NamespaceManagementApi as NamespaceManagementApi -from apollo_openapi.api.organization_management_api import OrganizationManagementApi as OrganizationManagementApi -from apollo_openapi.api.release_management_api import ReleaseManagementApi as ReleaseManagementApi - -# import ApiClient -from apollo_openapi.api_response import ApiResponse as ApiResponse -from apollo_openapi.api_client import ApiClient as ApiClient -from apollo_openapi.configuration import Configuration as Configuration -from apollo_openapi.exceptions import OpenApiException as OpenApiException -from apollo_openapi.exceptions import ApiTypeError as ApiTypeError -from apollo_openapi.exceptions import ApiValueError as ApiValueError -from apollo_openapi.exceptions import ApiKeyError as ApiKeyError -from apollo_openapi.exceptions import ApiAttributeError as ApiAttributeError -from apollo_openapi.exceptions import ApiException as ApiException - -# import models into sdk package -from apollo_openapi.models.change import Change as Change -from apollo_openapi.models.cluster_dto import ClusterDTO as ClusterDTO -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity as EntityPairKVEntity -from apollo_openapi.models.env_cluster_info import EnvClusterInfo as EnvClusterInfo -from apollo_openapi.models.item_change_sets import ItemChangeSets as ItemChangeSets -from apollo_openapi.models.item_dto import ItemDTO as ItemDTO -from apollo_openapi.models.kv_entity import KVEntity as KVEntity -from apollo_openapi.models.list_item_diffs import ListItemDiffs as ListItemDiffs -from apollo_openapi.models.list_release_bo import ListReleaseBO as ListReleaseBO -from apollo_openapi.models.map_string import MapString as MapString -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO as NamespaceGrayDelReleaseDTO -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier as NamespaceIdentifier -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO as NamespaceReleaseDTO -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel as NamespaceSyncModel -from apollo_openapi.models.namespace_text_model import NamespaceTextModel as NamespaceTextModel -from apollo_openapi.models.open_app_dto import OpenAppDTO as OpenAppDTO -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO as OpenAppNamespaceDTO -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO as OpenClusterDTO -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO as OpenCreateAppDTO -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO as OpenEnvClusterDTO -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO as OpenGrayReleaseRuleDTO -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO as OpenGrayReleaseRuleItemDTO -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO as OpenInstanceConfigDTO -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO as OpenInstanceDTO -from apollo_openapi.models.open_item_dto import OpenItemDTO as OpenItemDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO as OpenNamespaceDTO -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO as OpenNamespaceLockDTO -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto as OpenOrganizationDto -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO as OpenPageDTOOpenInstanceDTO -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO as OpenPageDTOOpenItemDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO as OpenReleaseDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response as OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response as OpenapiV1AppsPost400Response -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest as OpenapiV1AppsPostRequest -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response as OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response as OpenapiV1EnvsEnvReleasesCompareGet200Response -from apollo_openapi.models.release_dto import ReleaseDTO as ReleaseDTO - -""", - name=__name__, - doc=__doc__, - ) - ) diff --git a/python/apollo_openapi/api/__init__.py b/python/apollo_openapi/api/__init__.py deleted file mode 100644 index 97912d9..0000000 --- a/python/apollo_openapi/api/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -# flake8: noqa - -if __import__("typing").TYPE_CHECKING: - # import apis into api package - from apollo_openapi.api.app_management_api import AppManagementApi - from apollo_openapi.api.cluster_management_api import ClusterManagementApi - from apollo_openapi.api.instance_management_api import InstanceManagementApi - from apollo_openapi.api.item_management_api import ItemManagementApi - from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi - from apollo_openapi.api.namespace_management_api import NamespaceManagementApi - from apollo_openapi.api.organization_management_api import OrganizationManagementApi - from apollo_openapi.api.release_management_api import ReleaseManagementApi - -else: - from lazy_imports import LazyModule, as_package, load - - load( - LazyModule( - *as_package(__file__), - """# import apis into api package -from apollo_openapi.api.app_management_api import AppManagementApi -from apollo_openapi.api.cluster_management_api import ClusterManagementApi -from apollo_openapi.api.instance_management_api import InstanceManagementApi -from apollo_openapi.api.item_management_api import ItemManagementApi -from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi -from apollo_openapi.api.namespace_management_api import NamespaceManagementApi -from apollo_openapi.api.organization_management_api import OrganizationManagementApi -from apollo_openapi.api.release_management_api import ReleaseManagementApi - -""", - name=__name__, - doc=__doc__, - ) - ) diff --git a/python/apollo_openapi/api/app_management_api.py b/python/apollo_openapi/api/app_management_api.py deleted file mode 100644 index 106d0ae..0000000 --- a/python/apollo_openapi/api/app_management_api.py +++ /dev/null @@ -1,3591 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictStr -from typing import Any, Dict, List, Optional -from typing_extensions import Annotated -from apollo_openapi.models.env_cluster_info import EnvClusterInfo -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class AppManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_delete( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除AppNamespace - - DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_with_http_info( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除AppNamespace - - DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_without_preload_content( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除AppNamespace - - DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_namespace_name_delete_serialize( - self, - app_id, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_delete( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """删除应用 - - DELETE /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_delete_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_delete_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """删除应用 - - DELETE /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_delete_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_delete_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除应用 - - DELETE /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_delete_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_delete_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/apps/{appId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_env_clusters_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenEnvClusterDTO]: - """获取应用的环境集群信息 - - GET /openapi/v1/apps/{appId}/env-clusters - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_env_clusters_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenEnvClusterDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_env_clusters_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenEnvClusterDTO]]: - """获取应用的环境集群信息 - - GET /openapi/v1/apps/{appId}/env-clusters - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_env_clusters_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenEnvClusterDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_env_clusters_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取应用的环境集群信息 - - GET /openapi/v1/apps/{appId}/env-clusters - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_env_clusters_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenEnvClusterDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_env_clusters_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/env-clusters', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除关联的Namespace - - DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除关联的Namespace - - DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除关联的Namespace - - DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppDTO: - """获取单个应用信息 - - GET /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppDTO]: - """获取单个应用信息 - - GET /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取单个应用信息 - - GET /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_miss_envs_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[str]: - """查找缺失的环境 - - GET /openapi/v1/apps/{appId}/miss_envs - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_miss_envs_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_miss_envs_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[str]]: - """查找缺失的环境 - - GET /openapi/v1/apps/{appId}/miss_envs - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_miss_envs_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_miss_envs_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """查找缺失的环境 - - GET /openapi/v1/apps/{appId}/miss_envs - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_miss_envs_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_miss_envs_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/miss_envs', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_namespaces_releases_status_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Dict[str, Dict[str, bool]]: - """获取应用下所有Namespace的发布状态 - - GET /openapi/v1/apps/{appId}/namespaces/releases/status - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, Dict[str, bool]]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_namespaces_releases_status_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Dict[str, Dict[str, bool]]]: - """获取应用下所有Namespace的发布状态 - - GET /openapi/v1/apps/{appId}/namespaces/releases/status - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, Dict[str, bool]]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_namespaces_releases_status_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取应用下所有Namespace的发布状态 - - GET /openapi/v1/apps/{appId}/namespaces/releases/status - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dict[str, Dict[str, bool]]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_namespaces_releases_status_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/namespaces/releases/status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_navtree_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[EnvClusterInfo]: - """获取应用导航树 - - GET /openapi/v1/apps/{appId}/navtree - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_navtree_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EnvClusterInfo]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_navtree_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[EnvClusterInfo]]: - """获取应用导航树 - - GET /openapi/v1/apps/{appId}/navtree - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_navtree_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EnvClusterInfo]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_navtree_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取应用导航树 - - GET /openapi/v1/apps/{appId}/navtree - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_navtree_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[EnvClusterInfo]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_navtree_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/navtree', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_put( - self, - app_id: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppDTO: - """更新应用 - - PUT /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_put_serialize( - app_id=app_id, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_put_with_http_info( - self, - app_id: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppDTO]: - """更新应用 - - PUT /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_put_serialize( - app_id=app_id, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_put_without_preload_content( - self, - app_id: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """更新应用 - - PUT /openapi/v1/apps/{appId} - - :param app_id: (required) - :type app_id: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_put_serialize( - app_id=app_id, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_put_serialize( - self, - app_id, - open_app_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_app_dto is not None: - _body_params = open_app_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/apps/{appId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_by_self_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppDTO]: - """获取当前Consumer的应用列表(分页) - - GET /openapi/v1/apps/by-self - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_by_self_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_by_self_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppDTO]]: - """获取当前Consumer的应用列表(分页) - - GET /openapi/v1/apps/by-self - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_by_self_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_by_self_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取当前Consumer的应用列表(分页) - - GET /openapi/v1/apps/by-self - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_by_self_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_by_self_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/by-self', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_envs_env_post( - self, - env: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """在指定环境创建应用 - - POST /openapi/v1/apps/envs/{env} - - :param env: (required) - :type env: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_envs_env_post_serialize( - env=env, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_envs_env_post_with_http_info( - self, - env: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """在指定环境创建应用 - - POST /openapi/v1/apps/envs/{env} - - :param env: (required) - :type env: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_envs_env_post_serialize( - env=env, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_envs_env_post_without_preload_content( - self, - env: StrictStr, - open_app_dto: OpenAppDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """在指定环境创建应用 - - POST /openapi/v1/apps/envs/{env} - - :param env: (required) - :type env: str - :param open_app_dto: (required) - :type open_app_dto: OpenAppDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_envs_env_post_serialize( - env=env, - open_app_dto=open_app_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_envs_env_post_serialize( - self, - env, - open_app_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_app_dto is not None: - _body_params = open_app_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps/envs/{env}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_get( - self, - authorized: Annotated[Optional[StrictStr], Field(description="是否只返回授权的应用")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppDTO]: - """获取当前Consumer授权的应用列表 - - GET /openapi/v1/apps?authorized=true - - :param authorized: 是否只返回授权的应用 - :type authorized: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_get_serialize( - authorized=authorized, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_get_with_http_info( - self, - authorized: Annotated[Optional[StrictStr], Field(description="是否只返回授权的应用")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppDTO]]: - """获取当前Consumer授权的应用列表 - - GET /openapi/v1/apps?authorized=true - - :param authorized: 是否只返回授权的应用 - :type authorized: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_get_serialize( - authorized=authorized, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_get_without_preload_content( - self, - authorized: Annotated[Optional[StrictStr], Field(description="是否只返回授权的应用")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取当前Consumer授权的应用列表 - - GET /openapi/v1/apps?authorized=true - - :param authorized: 是否只返回授权的应用 - :type authorized: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_get_serialize( - authorized=authorized, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppDTO]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_get_serialize( - self, - authorized, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if authorized is not None: - - _query_params.append(('authorized', authorized)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_post( - self, - openapi_v1_apps_post_request: OpenapiV1AppsPostRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppDTO: - """创建应用 - - POST /openapi/v1/apps - - :param openapi_v1_apps_post_request: (required) - :type openapi_v1_apps_post_request: OpenapiV1AppsPostRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_post_serialize( - openapi_v1_apps_post_request=openapi_v1_apps_post_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsPost400Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_post_with_http_info( - self, - openapi_v1_apps_post_request: OpenapiV1AppsPostRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppDTO]: - """创建应用 - - POST /openapi/v1/apps - - :param openapi_v1_apps_post_request: (required) - :type openapi_v1_apps_post_request: OpenapiV1AppsPostRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_post_serialize( - openapi_v1_apps_post_request=openapi_v1_apps_post_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsPost400Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_post_without_preload_content( - self, - openapi_v1_apps_post_request: OpenapiV1AppsPostRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建应用 - - POST /openapi/v1/apps - - :param openapi_v1_apps_post_request: (required) - :type openapi_v1_apps_post_request: OpenapiV1AppsPostRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_post_serialize( - openapi_v1_apps_post_request=openapi_v1_apps_post_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppDTO", - '400': "OpenapiV1AppsPost400Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_post_serialize( - self, - openapi_v1_apps_post_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if openapi_v1_apps_post_request is not None: - _body_params = openapi_v1_apps_post_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/cluster_management_api.py b/python/apollo_openapi/api/cluster_management_api.py deleted file mode 100644 index de10b52..0000000 --- a/python/apollo_openapi/api/cluster_management_api.py +++ /dev/null @@ -1,1545 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictStr -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class ClusterManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_get( - self, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenClusterDTO: - """获取指定集群信息 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName} - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_get_with_http_info( - self, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenClusterDTO]: - """获取指定集群信息 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName} - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_get_without_preload_content( - self, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定集群信息 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName} - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_clusters_cluster_name_get_serialize( - self, - app_id, - cluster_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/clusters/{clusterName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_clusters_post( - self, - app_id: StrictStr, - open_cluster_dto: OpenClusterDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenClusterDTO: - """创建集群 - - POST /openapi/v1/apps/{appId}/clusters - - :param app_id: (required) - :type app_id: str - :param open_cluster_dto: (required) - :type open_cluster_dto: OpenClusterDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_post_serialize( - app_id=app_id, - open_cluster_dto=open_cluster_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_clusters_post_with_http_info( - self, - app_id: StrictStr, - open_cluster_dto: OpenClusterDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenClusterDTO]: - """创建集群 - - POST /openapi/v1/apps/{appId}/clusters - - :param app_id: (required) - :type app_id: str - :param open_cluster_dto: (required) - :type open_cluster_dto: OpenClusterDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_post_serialize( - app_id=app_id, - open_cluster_dto=open_cluster_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_clusters_post_without_preload_content( - self, - app_id: StrictStr, - open_cluster_dto: OpenClusterDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建集群 - - POST /openapi/v1/apps/{appId}/clusters - - :param app_id: (required) - :type app_id: str - :param open_cluster_dto: (required) - :type open_cluster_dto: OpenClusterDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_post_serialize( - app_id=app_id, - open_cluster_dto=open_cluster_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenClusterDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_clusters_post_serialize( - self, - app_id, - open_cluster_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_cluster_dto is not None: - _body_params = open_cluster_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps/{appId}/clusters', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """删除集群 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """删除集群 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除集群 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete_serialize( - self, - env, - app_id, - cluster_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """获取命名空间分支信息 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """获取命名空间分支信息 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取命名空间分支信息 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """获取指定的Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """获取指定的Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定的Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - fill_item_detail, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if fill_item_detail is not None: - - _query_params.append(('fillItemDetail', fill_item_detail)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/instance_management_api.py b/python/apollo_openapi/api/instance_management_api.py deleted file mode 100644 index f7c1c63..0000000 --- a/python/apollo_openapi/api/instance_management_api.py +++ /dev/null @@ -1,964 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictInt, StrictStr -from typing import List, Optional -from typing_extensions import Annotated -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class InstanceManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get( - self, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> int: - """获取命名空间下的实例数量 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "int", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_with_http_info( - self, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[int]: - """获取命名空间下的实例数量 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "int", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_without_preload_content( - self, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取命名空间下的实例数量 - - GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "int", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - self, - app_id, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - exclude_releases: Annotated[Optional[StrictStr], Field(description="排除的发布ID列表,用逗号分隔")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenInstanceDTO]: - """查询不在指定发布版本中的实例 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param exclude_releases: 排除的发布ID列表,用逗号分隔 - :type exclude_releases: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - exclude_releases=exclude_releases, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenInstanceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - exclude_releases: Annotated[Optional[StrictStr], Field(description="排除的发布ID列表,用逗号分隔")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenInstanceDTO]]: - """查询不在指定发布版本中的实例 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param exclude_releases: 排除的发布ID列表,用逗号分隔 - :type exclude_releases: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - exclude_releases=exclude_releases, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenInstanceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - exclude_releases: Annotated[Optional[StrictStr], Field(description="排除的发布ID列表,用逗号分隔")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """查询不在指定发布版本中的实例 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param exclude_releases: 排除的发布ID列表,用逗号分隔 - :type exclude_releases: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - exclude_releases=exclude_releases, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenInstanceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get_serialize( - self, - env, - app_id, - cluster_name, - namespace_name, - exclude_releases, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if exclude_releases is not None: - - _query_params.append(('excludeReleases', exclude_releases)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_release_id_instances_get( - self, - env: StrictStr, - release_id: StrictInt, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenPageDTOOpenInstanceDTO: - """根据发布版本查询实例(支持分页) - - GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_instances_get_serialize( - env=env, - release_id=release_id, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenInstanceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_release_id_instances_get_with_http_info( - self, - env: StrictStr, - release_id: StrictInt, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenPageDTOOpenInstanceDTO]: - """根据发布版本查询实例(支持分页) - - GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_instances_get_serialize( - env=env, - release_id=release_id, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenInstanceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_release_id_instances_get_without_preload_content( - self, - env: StrictStr, - release_id: StrictInt, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """根据发布版本查询实例(支持分页) - - GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_instances_get_serialize( - env=env, - release_id=release_id, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenInstanceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_release_id_instances_get_serialize( - self, - env, - release_id, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if release_id is not None: - _path_params['releaseId'] = release_id - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/releases/{releaseId}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/item_management_api.py b/python/apollo_openapi/api/item_management_api.py deleted file mode 100644 index 9f9bf1b..0000000 --- a/python/apollo_openapi/api/item_management_api.py +++ /dev/null @@ -1,4464 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictInt, StrictStr -from typing import Any, Dict, List -from apollo_openapi.models.list_item_diffs import ListItemDiffs -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class ItemManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """通过编码的key删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """通过编码的key删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过编码的key删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenItemDTO: - """通过查询参数获取配置项(支持编码的key) - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenItemDTO]: - """通过查询参数获取配置项(支持编码的key) - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过查询参数获取配置项(支持编码的key) - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """通过编码的key更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """通过编码的key更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过编码的key更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - create_if_not_exists, - open_item_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if create_if_not_exists is not None: - - _query_params.append(('createIfNotExists', create_if_not_exists)) - - # process the header parameters - # process the form parameters - # process the body parameter - if open_item_dto is not None: - _body_params = open_item_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """通过文本批量修改配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """通过文本批量修改配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """通过文本批量修改配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_text_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_text_model is not None: - _body_params = namespace_text_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ListItemDiffs]: - """对比命名空间配置差异 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListItemDiffs]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ListItemDiffs]]: - """对比命名空间配置差异 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListItemDiffs]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """对比命名空间配置差异 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListItemDiffs]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_sync_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_sync_model is not None: - _body_params = namespace_sync_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenPageDTOOpenItemDTO: - """获取命名空间下的配置项列表 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenPageDTOOpenItemDTO]: - """获取命名空间下的配置项列表 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取命名空间下的配置项列表 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenPageDTOOpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除配置项 - - DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenItemDTO: - """获取单个配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenItemDTO]: - """获取单个配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取单个配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - key: StrictStr, - create_if_not_exists: StrictBool, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """更新配置项 - - PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param key: (required) - :type key: str - :param create_if_not_exists: (required) - :type create_if_not_exists: bool - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - key=key, - create_if_not_exists=create_if_not_exists, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - key, - create_if_not_exists, - open_item_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if key is not None: - _path_params['key'] = key - # process the query parameters - if create_if_not_exists is not None: - - _query_params.append(('createIfNotExists', create_if_not_exists)) - - # process the header parameters - # process the form parameters - # process the body parameter - if open_item_dto is not None: - _body_params = open_item_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenItemDTO: - """创建新的配置项 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenItemDTO]: - """创建新的配置项 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - open_item_dto: OpenItemDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建新的配置项 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param open_item_dto: (required) - :type open_item_dto: OpenItemDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - open_item_dto=open_item_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenItemDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - open_item_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_item_dto is not None: - _body_params = open_item_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """撤销配置项更改 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """撤销配置项更改 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """撤销配置项更改 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1AppsGet401Response: - """同步配置项到多个命名空间 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1AppsGet401Response]: - """同步配置项到多个命名空间 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_sync_model: NamespaceSyncModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """同步配置项到多个命名空间 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_sync_model: (required) - :type namespace_sync_model: NamespaceSyncModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_sync_model=namespace_sync_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1AppsGet401Response", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_sync_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_sync_model is not None: - _body_params = namespace_sync_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response: - """验证配置文本语法 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - '400': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response]: - """验证配置文本语法 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - '400': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_text_model: NamespaceTextModel, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """验证配置文本语法 - - POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_text_model: (required) - :type namespace_text_model: NamespaceTextModel - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_text_model=namespace_text_model, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response", - '400': "OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_text_model, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_text_model is not None: - _body_params = namespace_text_model - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/namespace_branch_management_api.py b/python/apollo_openapi/api/namespace_branch_management_api.py deleted file mode 100644 index 5a57a5a..0000000 --- a/python/apollo_openapi/api/namespace_branch_management_api.py +++ /dev/null @@ -1,3164 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictStr -from typing import Any, Dict, List -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class NamespaceBranchManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """创建命名空间分支 - - POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """创建命名空间分支 - - POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建命名空间分支 - - POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """删除命名空间分支 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """删除命名空间分支 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """删除命名空间分支 - - DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete_serialize( - self, - env, - app_id, - cluster_name, - namespace_name, - branch_name, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """创建灰度删除发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_gray_del_release_dto: (required) - :type namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_gray_del_release_dto=namespace_gray_del_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """创建灰度删除发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_gray_del_release_dto: (required) - :type namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_gray_del_release_dto=namespace_gray_del_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建灰度删除发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_gray_del_release_dto: (required) - :type namespace_gray_del_release_dto: NamespaceGrayDelReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_gray_del_release_dto=namespace_gray_del_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - namespace_gray_del_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_gray_del_release_dto is not None: - _body_params = namespace_gray_del_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenGrayReleaseRuleDTO: - """获取分支灰度发布规则 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenGrayReleaseRuleDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenGrayReleaseRuleDTO]: - """获取分支灰度发布规则 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenGrayReleaseRuleDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取分支灰度发布规则 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenGrayReleaseRuleDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - open_gray_release_rule_dto: OpenGrayReleaseRuleDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """更新分支灰度发布规则 - - PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param open_gray_release_rule_dto: (required) - :type open_gray_release_rule_dto: OpenGrayReleaseRuleDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - open_gray_release_rule_dto=open_gray_release_rule_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - open_gray_release_rule_dto: OpenGrayReleaseRuleDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """更新分支灰度发布规则 - - PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param open_gray_release_rule_dto: (required) - :type open_gray_release_rule_dto: OpenGrayReleaseRuleDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - open_gray_release_rule_dto=open_gray_release_rule_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - operator: StrictStr, - open_gray_release_rule_dto: OpenGrayReleaseRuleDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """更新分支灰度发布规则 - - PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param operator: (required) - :type operator: str - :param open_gray_release_rule_dto: (required) - :type open_gray_release_rule_dto: OpenGrayReleaseRuleDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - operator=operator, - open_gray_release_rule_dto=open_gray_release_rule_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - operator, - open_gray_release_rule_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - if operator is not None: - _header_params['operator'] = operator - # process the form parameters - # process the body parameter - if open_gray_release_rule_dto is not None: - _body_params = open_gray_release_rule_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenItemDTO]: - """获取分支下的配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenItemDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenItemDTO]]: - """获取分支下的配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenItemDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取分支下的配置项 - - GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenItemDTO]", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """合并分支 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """合并分支 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """合并分支 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - delete_branch, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - if delete_branch is not None: - - _query_params.append(('deleteBranch', delete_branch)) - - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - x_apollo_operator: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """合并分支到主分支 - - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param x_apollo_operator: (required) - :type x_apollo_operator: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - x_apollo_operator=x_apollo_operator, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_with_http_info( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - x_apollo_operator: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """合并分支到主分支 - - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param x_apollo_operator: (required) - :type x_apollo_operator: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - x_apollo_operator=x_apollo_operator, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_without_preload_content( - self, - env: StrictStr, - app_id: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - delete_branch: StrictBool, - x_apollo_operator: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """合并分支到主分支 - - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - - :param env: (required) - :type env: str - :param app_id: (required) - :type app_id: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param delete_branch: (required) - :type delete_branch: bool - :param x_apollo_operator: (required) - :type x_apollo_operator: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - env=env, - app_id=app_id, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - delete_branch=delete_branch, - x_apollo_operator=x_apollo_operator, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch_serialize( - self, - env, - app_id, - cluster_name, - namespace_name, - branch_name, - delete_branch, - x_apollo_operator, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if app_id is not None: - _path_params['appId'] = app_id - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - if delete_branch is not None: - - _query_params.append(('deleteBranch', delete_branch)) - - # process the header parameters - if x_apollo_operator is not None: - _header_params['X-Apollo-Operator'] = x_apollo_operator - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """创建灰度发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """创建灰度发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - branch_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建灰度发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param branch_name: (required) - :type branch_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - branch_name=branch_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - branch_name, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - if branch_name is not None: - _path_params['branchName'] = branch_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/namespace_management_api.py b/python/apollo_openapi/api/namespace_management_api.py deleted file mode 100644 index 1cbee72..0000000 --- a/python/apollo_openapi/api/namespace_management_api.py +++ /dev/null @@ -1,2656 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictBool, StrictInt, StrictStr -from typing import List -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class NamespaceManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_appnamespaces_get( - self, - public_only: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppNamespaceDTO]: - """获取所有公共AppNamespace - - GET /openapi/v1/appnamespaces?public=true - - :param public_only: (required) - :type public_only: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_appnamespaces_get_serialize( - public_only=public_only, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_appnamespaces_get_with_http_info( - self, - public_only: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppNamespaceDTO]]: - """获取所有公共AppNamespace - - GET /openapi/v1/appnamespaces?public=true - - :param public_only: (required) - :type public_only: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_appnamespaces_get_serialize( - public_only=public_only, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_appnamespaces_get_without_preload_content( - self, - public_only: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取所有公共AppNamespace - - GET /openapi/v1/appnamespaces?public=true - - :param public_only: (required) - :type public_only: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_appnamespaces_get_serialize( - public_only=public_only, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_appnamespaces_get_serialize( - self, - public_only, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if public_only is not None: - - _query_params.append(('publicOnly', public_only)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/appnamespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_get( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenAppNamespaceDTO]: - """获取指定应用的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_get_with_http_info( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenAppNamespaceDTO]]: - """获取指定应用的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_get_without_preload_content( - self, - app_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定应用的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_get_serialize( - app_id=app_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenAppNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_get_serialize( - self, - app_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/appnamespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_get( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppNamespaceDTO: - """获取指定的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_get_with_http_info( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppNamespaceDTO]: - """获取指定的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_namespace_name_get_without_preload_content( - self, - app_id: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定的AppNamespace - - GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - - :param app_id: (required) - :type app_id: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - app_id=app_id, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_namespace_name_get_serialize( - self, - app_id, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_post( - self, - app_id: StrictStr, - open_app_namespace_dto: OpenAppNamespaceDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenAppNamespaceDTO: - """创建AppNamespace - - POST /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param open_app_namespace_dto: (required) - :type open_app_namespace_dto: OpenAppNamespaceDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_post_serialize( - app_id=app_id, - open_app_namespace_dto=open_app_namespace_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_post_with_http_info( - self, - app_id: StrictStr, - open_app_namespace_dto: OpenAppNamespaceDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenAppNamespaceDTO]: - """创建AppNamespace - - POST /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param open_app_namespace_dto: (required) - :type open_app_namespace_dto: OpenAppNamespaceDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_post_serialize( - app_id=app_id, - open_app_namespace_dto=open_app_namespace_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_appnamespaces_post_without_preload_content( - self, - app_id: StrictStr, - open_app_namespace_dto: OpenAppNamespaceDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建AppNamespace - - POST /openapi/v1/apps/{appId}/appnamespaces - - :param app_id: (required) - :type app_id: str - :param open_app_namespace_dto: (required) - :type open_app_namespace_dto: OpenAppNamespaceDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_appnamespaces_post_serialize( - app_id=app_id, - open_app_namespace_dto=open_app_namespace_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenAppNamespaceDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_appnamespaces_post_serialize( - self, - app_id, - open_app_namespace_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if open_app_namespace_dto is not None: - _body_params = open_app_namespace_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/apps/{appId}/appnamespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[str]: - """检查缺失的Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[str]]: - """检查缺失的Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """检查缺失的Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[str]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get_serialize( - self, - app_id, - env, - cluster_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceDTO: - """获取关联的公共Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceDTO]: - """获取关联的公共Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取关联的公共Namespace - - GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get( - self, - env: StrictStr, - public_namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenNamespaceDTO]: - """获取公共AppNamespace的所有实例 - - GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - - :param env: (required) - :type env: str - :param public_namespace_name: (required) - :type public_namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - env=env, - public_namespace_name=public_namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_with_http_info( - self, - env: StrictStr, - public_namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenNamespaceDTO]]: - """获取公共AppNamespace的所有实例 - - GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - - :param env: (required) - :type env: str - :param public_namespace_name: (required) - :type public_namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - env=env, - public_namespace_name=public_namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_without_preload_content( - self, - env: StrictStr, - public_namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取公共AppNamespace的所有实例 - - GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - - :param env: (required) - :type env: str - :param public_namespace_name: (required) - :type public_namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - env=env, - public_namespace_name=public_namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get_serialize( - self, - env, - public_namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if public_namespace_name is not None: - _path_params['publicNamespaceName'] = public_namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenNamespaceDTO]: - """获取指定集群下的所有Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenNamespaceDTO]]: - """获取指定集群下的所有Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - fill_item_detail: StrictBool, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取指定集群下的所有Namespace - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param fill_item_detail: (required) - :type fill_item_detail: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - fill_item_detail=fill_item_detail, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenNamespaceDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get_serialize( - self, - app_id, - env, - cluster_name, - fill_item_detail, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - # process the query parameters - if fill_item_detail is not None: - - _query_params.append(('fillItemDetail', fill_item_detail)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenNamespaceLockDTO: - """获取Namespace的锁状态 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceLockDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenNamespaceLockDTO]: - """获取Namespace的锁状态 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceLockDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取Namespace的锁状态 - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenNamespaceLockDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/organization_management_api.py b/python/apollo_openapi/api/organization_management_api.py deleted file mode 100644 index cae5f5d..0000000 --- a/python/apollo_openapi/api/organization_management_api.py +++ /dev/null @@ -1,286 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from typing import List -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class OrganizationManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_organizations_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenOrganizationDto]: - """获取所有组织信息 - - GET /openapi/v1/organizations - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_organizations_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenOrganizationDto]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_organizations_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenOrganizationDto]]: - """获取所有组织信息 - - GET /openapi/v1/organizations - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_organizations_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenOrganizationDto]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_organizations_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取所有组织信息 - - GET /openapi/v1/organizations - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_organizations_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenOrganizationDto]", - '401': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_organizations_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/organizations', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api/release_management_api.py b/python/apollo_openapi/api/release_management_api.py deleted file mode 100644 index 7bf8200..0000000 --- a/python/apollo_openapi/api/release_management_api.py +++ /dev/null @@ -1,2234 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt, StrictStr -from typing import Any, Dict, List -from apollo_openapi.models.list_release_bo import ListReleaseBO -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - -from apollo_openapi.api_client import ApiClient, RequestSerialized -from apollo_openapi.api_response import ApiResponse -from apollo_openapi.rest import RESTResponseType - - -class ReleaseManagementApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[OpenReleaseDTO]: - """获取活跃发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenReleaseDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[OpenReleaseDTO]]: - """获取活跃发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenReleaseDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取活跃发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[OpenReleaseDTO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[ListReleaseBO]: - """获取所有发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListReleaseBO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[ListReleaseBO]]: - """获取所有发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListReleaseBO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - page: StrictInt, - size: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取所有发布(分页) - - GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param page: (required) - :type page: int - :param size: (required) - :type size: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - page=page, - size=size, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[ListReleaseBO]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - page, - size, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """获取最新活跃发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """获取最新活跃发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取最新活跃发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '404': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """创建发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_with_http_info( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """创建发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_without_preload_content( - self, - app_id: StrictStr, - env: StrictStr, - cluster_name: StrictStr, - namespace_name: StrictStr, - namespace_release_dto: NamespaceReleaseDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """创建发布 - - - - :param app_id: (required) - :type app_id: str - :param env: (required) - :type env: str - :param cluster_name: (required) - :type cluster_name: str - :param namespace_name: (required) - :type namespace_name: str - :param namespace_release_dto: (required) - :type namespace_release_dto: NamespaceReleaseDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - app_id=app_id, - env=env, - cluster_name=cluster_name, - namespace_name=namespace_name, - namespace_release_dto=namespace_release_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - '400': "OpenapiV1AppsGet401Response", - '403': "OpenapiV1AppsGet401Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post_serialize( - self, - app_id, - env, - cluster_name, - namespace_name, - namespace_release_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if app_id is not None: - _path_params['appId'] = app_id - if env is not None: - _path_params['env'] = env - if cluster_name is not None: - _path_params['clusterName'] = cluster_name - if namespace_name is not None: - _path_params['namespaceName'] = namespace_name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if namespace_release_dto is not None: - _body_params = namespace_release_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_compare_get( - self, - env: StrictStr, - base_release_id: StrictInt, - to_compare_release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenapiV1EnvsEnvReleasesCompareGet200Response: - """对比发布 - - GET /openapi/v1/envs/{env}/releases/compare - - :param env: (required) - :type env: str - :param base_release_id: (required) - :type base_release_id: int - :param to_compare_release_id: (required) - :type to_compare_release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_compare_get_serialize( - env=env, - base_release_id=base_release_id, - to_compare_release_id=to_compare_release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvReleasesCompareGet200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_compare_get_with_http_info( - self, - env: StrictStr, - base_release_id: StrictInt, - to_compare_release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenapiV1EnvsEnvReleasesCompareGet200Response]: - """对比发布 - - GET /openapi/v1/envs/{env}/releases/compare - - :param env: (required) - :type env: str - :param base_release_id: (required) - :type base_release_id: int - :param to_compare_release_id: (required) - :type to_compare_release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_compare_get_serialize( - env=env, - base_release_id=base_release_id, - to_compare_release_id=to_compare_release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvReleasesCompareGet200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_compare_get_without_preload_content( - self, - env: StrictStr, - base_release_id: StrictInt, - to_compare_release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """对比发布 - - GET /openapi/v1/envs/{env}/releases/compare - - :param env: (required) - :type env: str - :param base_release_id: (required) - :type base_release_id: int - :param to_compare_release_id: (required) - :type to_compare_release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_compare_get_serialize( - env=env, - base_release_id=base_release_id, - to_compare_release_id=to_compare_release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenapiV1EnvsEnvReleasesCompareGet200Response", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_compare_get_serialize( - self, - env, - base_release_id, - to_compare_release_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - # process the query parameters - if base_release_id is not None: - - _query_params.append(('baseReleaseId', base_release_id)) - - if to_compare_release_id is not None: - - _query_params.append(('toCompareReleaseId', to_compare_release_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/releases/compare', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_release_id_get( - self, - env: StrictStr, - release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OpenReleaseDTO: - """获取发布详情 - - GET /openapi/v1/envs/{env}/releases/{releaseId} - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_get_serialize( - env=env, - release_id=release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_release_id_get_with_http_info( - self, - env: StrictStr, - release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OpenReleaseDTO]: - """获取发布详情 - - GET /openapi/v1/envs/{env}/releases/{releaseId} - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_get_serialize( - env=env, - release_id=release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_release_id_get_without_preload_content( - self, - env: StrictStr, - release_id: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """获取发布详情 - - GET /openapi/v1/envs/{env}/releases/{releaseId} - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_get_serialize( - env=env, - release_id=release_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OpenReleaseDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_release_id_get_serialize( - self, - env, - release_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if release_id is not None: - _path_params['releaseId'] = release_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/openapi/v1/envs/{env}/releases/{releaseId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def openapi_v1_envs_env_releases_release_id_rollback_put( - self, - env: StrictStr, - release_id: StrictInt, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """回滚发布 - - - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - env=env, - release_id=release_id, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def openapi_v1_envs_env_releases_release_id_rollback_put_with_http_info( - self, - env: StrictStr, - release_id: StrictInt, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """回滚发布 - - - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - env=env, - release_id=release_id, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def openapi_v1_envs_env_releases_release_id_rollback_put_without_preload_content( - self, - env: StrictStr, - release_id: StrictInt, - operator: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """回滚发布 - - - - :param env: (required) - :type env: str - :param release_id: (required) - :type release_id: int - :param operator: (required) - :type operator: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - env=env, - release_id=release_id, - operator=operator, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _openapi_v1_envs_env_releases_release_id_rollback_put_serialize( - self, - env, - release_id, - operator, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if env is not None: - _path_params['env'] = env - if release_id is not None: - _path_params['releaseId'] = release_id - # process the query parameters - if operator is not None: - - _query_params.append(('operator', operator)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/openapi/v1/envs/{env}/releases/{releaseId}/rollback', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python/apollo_openapi/api_client.py b/python/apollo_openapi/api_client.py deleted file mode 100644 index 15b20ed..0000000 --- a/python/apollo_openapi/api_client.py +++ /dev/null @@ -1,804 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile -import uuid - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from apollo_openapi.configuration import Configuration -from apollo_openapi.api_response import ApiResponse, T as ApiResponseT -import apollo_openapi.models -from apollo_openapi import rest -from apollo_openapi.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.0.1/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, uuid.UUID): - return str(obj) - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - if isinstance(obj_dict, list): - # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() - return self.sanitize_for_serialization(obj_dict) - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(apollo_openapi.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - - :param data: primitive type. - :param klass: class literal. - :return: enum value. - """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/python/apollo_openapi/api_response.py b/python/apollo_openapi/api_response.py deleted file mode 100644 index 9bc7c11..0000000 --- a/python/apollo_openapi/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/python/apollo_openapi/configuration.py b/python/apollo_openapi/configuration.py deleted file mode 100644 index 2a65cd8..0000000 --- a/python/apollo_openapi/configuration.py +++ /dev/null @@ -1,602 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import http.client as httplib -import logging -from logging import FileHandler -import multiprocessing -import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from typing_extensions import NotRequired, Self - -import urllib3 - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "ApiKeyAuth": APIKeyAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = apollo_openapi.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - """ - - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[int] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - *, - debug: Optional[bool] = None, - ) -> None: - """Constructor - """ - self._base_path = "http://localhost" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("apollo_openapi") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy: Optional[str] = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = retries - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default: Optional[Self]) -> None: - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = cls() - return cls._default - - @property - def logger_file(self) -> Optional[str]: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self) -> bool: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value: bool) -> None: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self) -> str: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value: str) -> None: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - return None - - def get_basic_auth_token(self) -> Optional[str]: - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self)-> AuthSettings: - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth: AuthSettings = {} - if 'ApiKeyAuth' in self.api_key: - auth['ApiKeyAuth'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_api_key_with_prefix( - 'ApiKeyAuth', - ), - } - return auth - - def to_debug_report(self) -> str: - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 0.0.1".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self) -> List[HostSetting]: - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "", - 'description': "No description provided", - } - ] - - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value: str) -> None: - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/python/apollo_openapi/exceptions.py b/python/apollo_openapi/exceptions.py deleted file mode 100644 index 2dfa393..0000000 --- a/python/apollo_openapi/exceptions.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/python/apollo_openapi/models/__init__.py b/python/apollo_openapi/models/__init__.py deleted file mode 100644 index f5326ca..0000000 --- a/python/apollo_openapi/models/__init__.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -if __import__("typing").TYPE_CHECKING: - # import models into model package - from apollo_openapi.models.change import Change - from apollo_openapi.models.cluster_dto import ClusterDTO - from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity - from apollo_openapi.models.env_cluster_info import EnvClusterInfo - from apollo_openapi.models.item_change_sets import ItemChangeSets - from apollo_openapi.models.item_dto import ItemDTO - from apollo_openapi.models.kv_entity import KVEntity - from apollo_openapi.models.list_item_diffs import ListItemDiffs - from apollo_openapi.models.list_release_bo import ListReleaseBO - from apollo_openapi.models.map_string import MapString - from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - from apollo_openapi.models.namespace_identifier import NamespaceIdentifier - from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO - from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel - from apollo_openapi.models.namespace_text_model import NamespaceTextModel - from apollo_openapi.models.open_app_dto import OpenAppDTO - from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO - from apollo_openapi.models.open_cluster_dto import OpenClusterDTO - from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO - from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO - from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO - from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO - from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO - from apollo_openapi.models.open_instance_dto import OpenInstanceDTO - from apollo_openapi.models.open_item_dto import OpenItemDTO - from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO - from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO - from apollo_openapi.models.open_release_dto import OpenReleaseDTO - from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response - from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - from apollo_openapi.models.release_dto import ReleaseDTO - -else: - from lazy_imports import LazyModule, as_package, load - - load( - LazyModule( - *as_package(__file__), - """# import models into model package -from apollo_openapi.models.change import Change -from apollo_openapi.models.cluster_dto import ClusterDTO -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity -from apollo_openapi.models.env_cluster_info import EnvClusterInfo -from apollo_openapi.models.item_change_sets import ItemChangeSets -from apollo_openapi.models.item_dto import ItemDTO -from apollo_openapi.models.kv_entity import KVEntity -from apollo_openapi.models.list_item_diffs import ListItemDiffs -from apollo_openapi.models.list_release_bo import ListReleaseBO -from apollo_openapi.models.map_string import MapString -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response -from apollo_openapi.models.release_dto import ReleaseDTO - -""", - name=__name__, - doc=__doc__, - ) - ) diff --git a/python/apollo_openapi/models/change.py b/python/apollo_openapi/models/change.py deleted file mode 100644 index b98ec00..0000000 --- a/python/apollo_openapi/models/change.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity -from typing import Optional, Set -from typing_extensions import Self - -class Change(BaseModel): - """ - Change - """ # noqa: E501 - type: Optional[StrictStr] = None - entity: Optional[EntityPairKVEntity] = None - __properties: ClassVar[List[str]] = ["type", "entity"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['ADDED', 'MODIFIED', 'DELETED']): - raise ValueError("must be one of enum values ('ADDED', 'MODIFIED', 'DELETED')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Change from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of entity - if self.entity: - _dict['entity'] = self.entity.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Change from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "entity": EntityPairKVEntity.from_dict(obj["entity"]) if obj.get("entity") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/cluster_dto.py b/python/apollo_openapi/models/cluster_dto.py deleted file mode 100644 index b364202..0000000 --- a/python/apollo_openapi/models/cluster_dto.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ClusterDTO(BaseModel): - """ - ClusterDTO - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = None - name: Annotated[str, Field(strict=True)] - app_id: StrictStr = Field(alias="appId") - parent_cluster_id: Optional[StrictInt] = Field(default=None, alias="parentClusterId") - comment: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "name", "appId", "parentClusterId", "comment"] - - @field_validator('name') - def name_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*", value): - raise ValueError(r"must validate the regular expression /[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*/") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClusterDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClusterDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "parentClusterId": obj.get("parentClusterId"), - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/entity_pair_kv_entity.py b/python/apollo_openapi/models/entity_pair_kv_entity.py deleted file mode 100644 index 307b4b4..0000000 --- a/python/apollo_openapi/models/entity_pair_kv_entity.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.kv_entity import KVEntity -from typing import Optional, Set -from typing_extensions import Self - -class EntityPairKVEntity(BaseModel): - """ - EntityPairKVEntity - """ # noqa: E501 - first_entity: Optional[KVEntity] = Field(default=None, alias="firstEntity") - second_entity: Optional[KVEntity] = Field(default=None, alias="secondEntity") - __properties: ClassVar[List[str]] = ["firstEntity", "secondEntity"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EntityPairKVEntity from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of first_entity - if self.first_entity: - _dict['firstEntity'] = self.first_entity.to_dict() - # override the default output from pydantic by calling `to_dict()` of second_entity - if self.second_entity: - _dict['secondEntity'] = self.second_entity.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EntityPairKVEntity from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "firstEntity": KVEntity.from_dict(obj["firstEntity"]) if obj.get("firstEntity") is not None else None, - "secondEntity": KVEntity.from_dict(obj["secondEntity"]) if obj.get("secondEntity") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/env_cluster_info.py b/python/apollo_openapi/models/env_cluster_info.py deleted file mode 100644 index e130b2b..0000000 --- a/python/apollo_openapi/models/env_cluster_info.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.cluster_dto import ClusterDTO -from typing import Optional, Set -from typing_extensions import Self - -class EnvClusterInfo(BaseModel): - """ - EnvClusterInfo - """ # noqa: E501 - env: Optional[StrictStr] = None - clusters: Optional[List[ClusterDTO]] = None - __properties: ClassVar[List[str]] = ["env", "clusters"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EnvClusterInfo from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in clusters (list) - _items = [] - if self.clusters: - for _item_clusters in self.clusters: - if _item_clusters: - _items.append(_item_clusters.to_dict()) - _dict['clusters'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnvClusterInfo from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "env": obj.get("env"), - "clusters": [ClusterDTO.from_dict(_item) for _item in obj["clusters"]] if obj.get("clusters") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/item_change_sets.py b/python/apollo_openapi/models/item_change_sets.py deleted file mode 100644 index 7ad2fd6..0000000 --- a/python/apollo_openapi/models/item_change_sets.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.item_dto import ItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class ItemChangeSets(BaseModel): - """ - ItemChangeSets - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - create_items: Optional[List[ItemDTO]] = Field(default=None, alias="createItems") - update_items: Optional[List[ItemDTO]] = Field(default=None, alias="updateItems") - delete_items: Optional[List[ItemDTO]] = Field(default=None, alias="deleteItems") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "createItems", "updateItems", "deleteItems"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ItemChangeSets from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in create_items (list) - _items = [] - if self.create_items: - for _item_create_items in self.create_items: - if _item_create_items: - _items.append(_item_create_items.to_dict()) - _dict['createItems'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in update_items (list) - _items = [] - if self.update_items: - for _item_update_items in self.update_items: - if _item_update_items: - _items.append(_item_update_items.to_dict()) - _dict['updateItems'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in delete_items (list) - _items = [] - if self.delete_items: - for _item_delete_items in self.delete_items: - if _item_delete_items: - _items.append(_item_delete_items.to_dict()) - _dict['deleteItems'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ItemChangeSets from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "createItems": [ItemDTO.from_dict(_item) for _item in obj["createItems"]] if obj.get("createItems") is not None else None, - "updateItems": [ItemDTO.from_dict(_item) for _item in obj["updateItems"]] if obj.get("updateItems") is not None else None, - "deleteItems": [ItemDTO.from_dict(_item) for _item in obj["deleteItems"]] if obj.get("deleteItems") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/item_dto.py b/python/apollo_openapi/models/item_dto.py deleted file mode 100644 index befb8a5..0000000 --- a/python/apollo_openapi/models/item_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ItemDTO(BaseModel): - """ - ItemDTO - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = None - namespace_id: Optional[StrictInt] = Field(default=None, alias="namespaceId") - key: Optional[StrictStr] = None - type: Optional[StrictInt] = None - value: Optional[StrictStr] = None - comment: Optional[StrictStr] = None - line_num: Optional[StrictInt] = Field(default=None, alias="lineNum") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "namespaceId", "key", "type", "value", "comment", "lineNum"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "namespaceId": obj.get("namespaceId"), - "key": obj.get("key"), - "type": obj.get("type"), - "value": obj.get("value"), - "comment": obj.get("comment"), - "lineNum": obj.get("lineNum") - }) - return _obj - - diff --git a/python/apollo_openapi/models/kv_entity.py b/python/apollo_openapi/models/kv_entity.py deleted file mode 100644 index 572ebb7..0000000 --- a/python/apollo_openapi/models/kv_entity.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class KVEntity(BaseModel): - """ - KVEntity - """ # noqa: E501 - key: Optional[StrictStr] = None - value: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key", "value"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of KVEntity from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of KVEntity from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key"), - "value": obj.get("value") - }) - return _obj - - diff --git a/python/apollo_openapi/models/list_item_diffs.py b/python/apollo_openapi/models/list_item_diffs.py deleted file mode 100644 index da76df7..0000000 --- a/python/apollo_openapi/models/list_item_diffs.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.item_change_sets import ItemChangeSets -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier -from typing import Optional, Set -from typing_extensions import Self - -class ListItemDiffs(BaseModel): - """ - ListItemDiffs - """ # noqa: E501 - namespace: Optional[NamespaceIdentifier] = None - diffs: Optional[ItemChangeSets] = None - ext_info: Optional[StrictStr] = Field(default=None, alias="extInfo") - __properties: ClassVar[List[str]] = ["namespace", "diffs", "extInfo"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListItemDiffs from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of namespace - if self.namespace: - _dict['namespace'] = self.namespace.to_dict() - # override the default output from pydantic by calling `to_dict()` of diffs - if self.diffs: - _dict['diffs'] = self.diffs.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListItemDiffs from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "namespace": NamespaceIdentifier.from_dict(obj["namespace"]) if obj.get("namespace") is not None else None, - "diffs": ItemChangeSets.from_dict(obj["diffs"]) if obj.get("diffs") is not None else None, - "extInfo": obj.get("extInfo") - }) - return _obj - - diff --git a/python/apollo_openapi/models/list_release_bo.py b/python/apollo_openapi/models/list_release_bo.py deleted file mode 100644 index f2f9102..0000000 --- a/python/apollo_openapi/models/list_release_bo.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.kv_entity import KVEntity -from apollo_openapi.models.release_dto import ReleaseDTO -from typing import Optional, Set -from typing_extensions import Self - -class ListReleaseBO(BaseModel): - """ - ListReleaseBO - """ # noqa: E501 - base_info: Optional[ReleaseDTO] = Field(default=None, alias="baseInfo") - items: Optional[List[KVEntity]] = None - __properties: ClassVar[List[str]] = ["baseInfo", "items"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListReleaseBO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of base_info - if self.base_info: - _dict['baseInfo'] = self.base_info.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListReleaseBO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "baseInfo": ReleaseDTO.from_dict(obj["baseInfo"]) if obj.get("baseInfo") is not None else None, - "items": [KVEntity.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/map_string.py b/python/apollo_openapi/models/map_string.py deleted file mode 100644 index 759d3d4..0000000 --- a/python/apollo_openapi/models/map_string.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class MapString(BaseModel): - """ - 字符串映射对象,用于表示键值对的配置数据结构 - """ # noqa: E501 - key: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["key"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MapString from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MapString from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "key": obj.get("key") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_gray_del_release_dto.py b/python/apollo_openapi/models/namespace_gray_del_release_dto.py deleted file mode 100644 index 7f50df5..0000000 --- a/python/apollo_openapi/models/namespace_gray_del_release_dto.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceGrayDelReleaseDTO(BaseModel): - """ - 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - """ # noqa: E501 - release_title: Optional[StrictStr] = Field(default=None, description="发布标题,用于标识这次灰度删除发布的名称或版本号", alias="releaseTitle") - release_comment: Optional[StrictStr] = Field(default=None, description="发布备注,详细描述本次灰度删除发布的目的和删除的配置项", alias="releaseComment") - released_by: Optional[StrictStr] = Field(default=None, description="发布操作者用户名,记录是谁执行了这次灰度删除发布操作", alias="releasedBy") - is_emergency_publish: Optional[StrictBool] = Field(default=None, description="是否为紧急发布,紧急发布可能会跳过某些审核流程", alias="isEmergencyPublish") - gray_del_keys: Optional[List[StrictStr]] = Field(default=None, description="需要在灰度发布中删除的配置项键名列表", alias="grayDelKeys") - __properties: ClassVar[List[str]] = ["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish", "grayDelKeys"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceGrayDelReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceGrayDelReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "releaseTitle": obj.get("releaseTitle"), - "releaseComment": obj.get("releaseComment"), - "releasedBy": obj.get("releasedBy"), - "isEmergencyPublish": obj.get("isEmergencyPublish"), - "grayDelKeys": obj.get("grayDelKeys") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_identifier.py b/python/apollo_openapi/models/namespace_identifier.py deleted file mode 100644 index f490f7f..0000000 --- a/python/apollo_openapi/models/namespace_identifier.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceIdentifier(BaseModel): - """ - NamespaceIdentifier - """ # noqa: E501 - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - env: Optional[StrictStr] = None - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, alias="namespaceName") - __properties: ClassVar[List[str]] = ["appId", "env", "clusterName", "namespaceName"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceIdentifier from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceIdentifier from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appId": obj.get("appId"), - "env": obj.get("env"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_release_dto.py b/python/apollo_openapi/models/namespace_release_dto.py deleted file mode 100644 index b69486a..0000000 --- a/python/apollo_openapi/models/namespace_release_dto.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceReleaseDTO(BaseModel): - """ - 命名空间发布请求数据传输对象,用于创建新的配置发布 - """ # noqa: E501 - release_title: Optional[StrictStr] = Field(default=None, description="发布标题,用于标识这次发布的名称或版本号", alias="releaseTitle") - release_comment: Optional[StrictStr] = Field(default=None, description="发布备注,详细描述本次发布的变更内容和目的", alias="releaseComment") - released_by: Optional[StrictStr] = Field(default=None, description="发布操作者用户名,记录是谁执行了这次发布操作", alias="releasedBy") - is_emergency_publish: Optional[StrictBool] = Field(default=None, description="是否为紧急发布,紧急发布可能会跳过某些审核流程", alias="isEmergencyPublish") - __properties: ClassVar[List[str]] = ["releaseTitle", "releaseComment", "releasedBy", "isEmergencyPublish"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "releaseTitle": obj.get("releaseTitle"), - "releaseComment": obj.get("releaseComment"), - "releasedBy": obj.get("releasedBy"), - "isEmergencyPublish": obj.get("isEmergencyPublish") - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_sync_model.py b/python/apollo_openapi/models/namespace_sync_model.py deleted file mode 100644 index 6d822c9..0000000 --- a/python/apollo_openapi/models/namespace_sync_model.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.item_dto import ItemDTO -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceSyncModel(BaseModel): - """ - NamespaceSyncModel - """ # noqa: E501 - sync_to_namespaces: Optional[List[NamespaceIdentifier]] = Field(default=None, alias="syncToNamespaces") - sync_items: Optional[List[ItemDTO]] = Field(default=None, alias="syncItems") - __properties: ClassVar[List[str]] = ["syncToNamespaces", "syncItems"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceSyncModel from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in sync_to_namespaces (list) - _items = [] - if self.sync_to_namespaces: - for _item_sync_to_namespaces in self.sync_to_namespaces: - if _item_sync_to_namespaces: - _items.append(_item_sync_to_namespaces.to_dict()) - _dict['syncToNamespaces'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in sync_items (list) - _items = [] - if self.sync_items: - for _item_sync_items in self.sync_items: - if _item_sync_items: - _items.append(_item_sync_items.to_dict()) - _dict['syncItems'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceSyncModel from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "syncToNamespaces": [NamespaceIdentifier.from_dict(_item) for _item in obj["syncToNamespaces"]] if obj.get("syncToNamespaces") is not None else None, - "syncItems": [ItemDTO.from_dict(_item) for _item in obj["syncItems"]] if obj.get("syncItems") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/namespace_text_model.py b/python/apollo_openapi/models/namespace_text_model.py deleted file mode 100644 index 29264e4..0000000 --- a/python/apollo_openapi/models/namespace_text_model.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class NamespaceTextModel(BaseModel): - """ - NamespaceTextModel - """ # noqa: E501 - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - env: Optional[StrictStr] = None - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, alias="namespaceName") - namespace_id: Optional[StrictInt] = Field(default=None, alias="namespaceId") - format: Optional[StrictStr] = None - config_text: Optional[StrictStr] = Field(default=None, alias="configText") - operator: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["appId", "env", "clusterName", "namespaceName", "namespaceId", "format", "configText", "operator"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of NamespaceTextModel from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of NamespaceTextModel from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "appId": obj.get("appId"), - "env": obj.get("env"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "namespaceId": obj.get("namespaceId"), - "format": obj.get("format"), - "configText": obj.get("configText"), - "operator": obj.get("operator") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_app_dto.py b/python/apollo_openapi/models/open_app_dto.py deleted file mode 100644 index 6b3c0c5..0000000 --- a/python/apollo_openapi/models/open_app_dto.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenAppDTO(BaseModel): - """ - Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="数据创建者用户名,记录是谁创建了这个应用", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="数据最后修改者用户名,记录最后一次修改应用信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="数据创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="数据最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - name: Optional[StrictStr] = Field(default=None, description="应用名称,用于显示的友好名称") - app_id: Optional[StrictStr] = Field(default=None, description="应用唯一标识符,全局唯一的应用ID", alias="appId") - org_id: Optional[StrictStr] = Field(default=None, description="组织ID,应用所属组织的唯一标识", alias="orgId") - org_name: Optional[StrictStr] = Field(default=None, description="组织名称,应用所属组织的显示名称", alias="orgName") - owner_name: Optional[StrictStr] = Field(default=None, description="应用负责人姓名,应用的主要负责人", alias="ownerName") - owner_email: Optional[StrictStr] = Field(default=None, description="应用负责人邮箱地址,用于接收应用相关通知", alias="ownerEmail") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenAppDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenAppDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "orgId": obj.get("orgId"), - "orgName": obj.get("orgName"), - "ownerName": obj.get("ownerName"), - "ownerEmail": obj.get("ownerEmail") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_app_namespace_dto.py b/python/apollo_openapi/models/open_app_namespace_dto.py deleted file mode 100644 index 2170a57..0000000 --- a/python/apollo_openapi/models/open_app_namespace_dto.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenAppNamespaceDTO(BaseModel): - """ - Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="命名空间创建者用户名,记录是谁创建了这个应用命名空间", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="命名空间创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="命名空间最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - name: Optional[StrictStr] = Field(default=None, description="命名空间名称,在同一应用内唯一标识一个命名空间") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - format: Optional[StrictStr] = Field(default=None, description="命名空间格式类型,如properties、xml、json、yml等") - is_public: Optional[StrictBool] = Field(default=None, description="是否为公共命名空间,公共命名空间可以被其他应用关联使用", alias="isPublic") - append_namespace_prefix: Optional[StrictBool] = Field(default=True, description="对于公共命名空间,是否在命名空间名称前添加前缀", alias="appendNamespacePrefix") - comment: Optional[StrictStr] = Field(default=None, description="命名空间备注说明,描述命名空间的用途和包含的配置类型") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "format", "isPublic", "appendNamespacePrefix", "comment"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenAppNamespaceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenAppNamespaceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "format": obj.get("format"), - "isPublic": obj.get("isPublic"), - "appendNamespacePrefix": obj.get("appendNamespacePrefix") if obj.get("appendNamespacePrefix") is not None else True, - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_cluster_dto.py b/python/apollo_openapi/models/open_cluster_dto.py deleted file mode 100644 index 1869e0a..0000000 --- a/python/apollo_openapi/models/open_cluster_dto.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenClusterDTO(BaseModel): - """ - Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="集群创建者用户名,记录是谁创建了这个集群", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="集群最后修改者用户名,记录最后一次修改集群信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="集群创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="集群最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - name: Optional[StrictStr] = Field(default=None, description="集群名称,在同一应用和环境下唯一标识一个集群") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenClusterDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenClusterDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "name": obj.get("name"), - "appId": obj.get("appId") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_create_app_dto.py b/python/apollo_openapi/models/open_create_app_dto.py deleted file mode 100644 index 79bb8bd..0000000 --- a/python/apollo_openapi/models/open_create_app_dto.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_app_dto import OpenAppDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenCreateAppDTO(BaseModel): - """ - 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - """ # noqa: E501 - assign_app_role_to_self: Optional[StrictBool] = Field(default=None, description="是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", alias="assignAppRoleToSelf") - admins: Optional[List[StrictStr]] = Field(default=None, description="应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限") - app: Optional[OpenAppDTO] = None - __properties: ClassVar[List[str]] = ["assignAppRoleToSelf", "admins", "app"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenCreateAppDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app - if self.app: - _dict['app'] = self.app.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenCreateAppDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "assignAppRoleToSelf": obj.get("assignAppRoleToSelf"), - "admins": obj.get("admins"), - "app": OpenAppDTO.from_dict(obj["app"]) if obj.get("app") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_env_cluster_dto.py b/python/apollo_openapi/models/open_env_cluster_dto.py deleted file mode 100644 index ea767b9..0000000 --- a/python/apollo_openapi/models/open_env_cluster_dto.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenEnvClusterDTO(BaseModel): - """ - OpenEnvClusterDTO - """ # noqa: E501 - env: Optional[StrictStr] = None - clusters: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["env", "clusters"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenEnvClusterDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenEnvClusterDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "env": obj.get("env"), - "clusters": obj.get("clusters") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_gray_release_rule_dto.py b/python/apollo_openapi/models/open_gray_release_rule_dto.py deleted file mode 100644 index 92b292b..0000000 --- a/python/apollo_openapi/models/open_gray_release_rule_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenGrayReleaseRuleDTO(BaseModel): - """ - Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="灰度规则创建者用户名,记录是谁创建了这个灰度发布规则", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="灰度规则最后修改者用户名,记录最后一次修改规则的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="灰度规则创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="灰度规则最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, description="所属集群的名称", alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, description="所属命名空间的名称", alias="namespaceName") - branch_name: Optional[StrictStr] = Field(default=None, description="灰度分支名称,标识灰度发布的分支", alias="branchName") - rule_items: Optional[List[OpenGrayReleaseRuleItemDTO]] = Field(default=None, description="灰度发布规则项列表,包含具体的灰度规则条件", alias="ruleItems") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "branchName", "ruleItems"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in rule_items (list) - _items = [] - if self.rule_items: - for _item_rule_items in self.rule_items: - if _item_rule_items: - _items.append(_item_rule_items.to_dict()) - _dict['ruleItems'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "branchName": obj.get("branchName"), - "ruleItems": [OpenGrayReleaseRuleItemDTO.from_dict(_item) for _item in obj["ruleItems"]] if obj.get("ruleItems") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_gray_release_rule_item_dto.py b/python/apollo_openapi/models/open_gray_release_rule_item_dto.py deleted file mode 100644 index a8657a5..0000000 --- a/python/apollo_openapi/models/open_gray_release_rule_item_dto.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenGrayReleaseRuleItemDTO(BaseModel): - """ - Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - """ # noqa: E501 - client_app_id: Optional[StrictStr] = Field(default=None, description="客户端应用ID,指定哪个应用可以获取灰度配置", alias="clientAppId") - client_ip_list: Optional[List[StrictStr]] = Field(default=None, description="客户端IP地址列表,指定哪些IP地址可以获取灰度配置", alias="clientIpList") - client_label_list: Optional[List[StrictStr]] = Field(default=None, description="客户端标签列表,通过标签来识别可以获取灰度配置的客户端", alias="clientLabelList") - __properties: ClassVar[List[str]] = ["clientAppId", "clientIpList", "clientLabelList"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenGrayReleaseRuleItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "clientAppId": obj.get("clientAppId"), - "clientIpList": obj.get("clientIpList"), - "clientLabelList": obj.get("clientLabelList") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_instance_config_dto.py b/python/apollo_openapi/models/open_instance_config_dto.py deleted file mode 100644 index 46d9c6b..0000000 --- a/python/apollo_openapi/models/open_instance_config_dto.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenInstanceConfigDTO(BaseModel): - """ - OpenInstanceConfigDTO - """ # noqa: E501 - release: Optional[OpenReleaseDTO] = None - release_delivery_time: Optional[StrictStr] = Field(default=None, alias="releaseDeliveryTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - __properties: ClassVar[List[str]] = ["release", "releaseDeliveryTime", "dataChangeLastModifiedTime"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenInstanceConfigDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of release - if self.release: - _dict['release'] = self.release.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenInstanceConfigDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "release": OpenReleaseDTO.from_dict(obj["release"]) if obj.get("release") is not None else None, - "releaseDeliveryTime": obj.get("releaseDeliveryTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_instance_dto.py b/python/apollo_openapi/models/open_instance_dto.py deleted file mode 100644 index 1e2899a..0000000 --- a/python/apollo_openapi/models/open_instance_dto.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenInstanceDTO(BaseModel): - """ - OpenInstanceDTO - """ # noqa: E501 - id: Optional[StrictInt] = None - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - data_center: Optional[StrictStr] = Field(default=None, alias="dataCenter") - ip: Optional[StrictStr] = None - configs: Optional[List[OpenInstanceConfigDTO]] = None - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - __properties: ClassVar[List[str]] = ["id", "appId", "clusterName", "dataCenter", "ip", "configs", "dataChangeCreatedTime"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenInstanceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in configs (list) - _items = [] - if self.configs: - for _item_configs in self.configs: - if _item_configs: - _items.append(_item_configs.to_dict()) - _dict['configs'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenInstanceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "dataCenter": obj.get("dataCenter"), - "ip": obj.get("ip"), - "configs": [OpenInstanceConfigDTO.from_dict(_item) for _item in obj["configs"]] if obj.get("configs") is not None else None, - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_item_dto.py b/python/apollo_openapi/models/open_item_dto.py deleted file mode 100644 index b2c5ff5..0000000 --- a/python/apollo_openapi/models/open_item_dto.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenItemDTO(BaseModel): - """ - Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="配置项创建者用户名,记录是谁创建了这个配置项", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="配置项最后修改者用户名,记录最后一次修改配置的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="配置项创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="配置项最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - key: Optional[StrictStr] = Field(default=None, description="配置项的键名,在同一命名空间内唯一标识一个配置项") - type: Optional[StrictInt] = Field(default=None, description="配置项类型,0表示普通配置项,1表示文件类型配置项") - value: Optional[StrictStr] = Field(default=None, description="配置项的值,可以是字符串、数字、JSON等格式") - comment: Optional[StrictStr] = Field(default=None, description="配置项的注释说明,用于描述配置项的用途和含义") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "key": obj.get("key"), - "type": obj.get("type"), - "value": obj.get("value"), - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_namespace_dto.py b/python/apollo_openapi/models/open_namespace_dto.py deleted file mode 100644 index e5d8815..0000000 --- a/python/apollo_openapi/models/open_namespace_dto.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_item_dto import OpenItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenNamespaceDTO(BaseModel): - """ - Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="命名空间创建者用户名,记录是谁创建了这个命名空间", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="命名空间创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="命名空间最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, description="所属集群的名称", alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, description="命名空间名称,在同一应用和集群下唯一标识一个命名空间", alias="namespaceName") - comment: Optional[StrictStr] = Field(default=None, description="命名空间备注说明,描述命名空间的用途") - format: Optional[StrictStr] = Field(default=None, description="命名空间格式类型,如properties、xml、json、yml等") - is_public: Optional[StrictBool] = Field(default=None, description="是否为公共命名空间,公共命名空间可以被其他应用关联使用", alias="isPublic") - items: Optional[List[OpenItemDTO]] = Field(default=None, description="命名空间包含的配置项列表") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenNamespaceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenNamespaceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "comment": obj.get("comment"), - "format": obj.get("format"), - "isPublic": obj.get("isPublic"), - "items": [OpenItemDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_namespace_lock_dto.py b/python/apollo_openapi/models/open_namespace_lock_dto.py deleted file mode 100644 index e9fc8c7..0000000 --- a/python/apollo_openapi/models/open_namespace_lock_dto.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenNamespaceLockDTO(BaseModel): - """ - Apollo命名空间锁状态数据传输对象 - """ # noqa: E501 - namespace_name: Optional[StrictStr] = Field(default=None, description="命名空间名称", alias="namespaceName") - is_locked: Optional[StrictBool] = Field(default=None, description="是否被锁定", alias="isLocked") - locked_by: Optional[StrictStr] = Field(default=None, description="锁定者用户名", alias="lockedBy") - __properties: ClassVar[List[str]] = ["namespaceName", "isLocked", "lockedBy"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenNamespaceLockDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenNamespaceLockDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "namespaceName": obj.get("namespaceName"), - "isLocked": obj.get("isLocked"), - "lockedBy": obj.get("lockedBy") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_organization_dto.py b/python/apollo_openapi/models/open_organization_dto.py deleted file mode 100644 index 6b6caf4..0000000 --- a/python/apollo_openapi/models/open_organization_dto.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenOrganizationDto(BaseModel): - """ - OpenOrganizationDto - """ # noqa: E501 - org_id: Optional[StrictStr] = Field(default=None, alias="orgId") - org_name: Optional[StrictStr] = Field(default=None, alias="orgName") - __properties: ClassVar[List[str]] = ["orgId", "orgName"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenOrganizationDto from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenOrganizationDto from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgName": obj.get("orgName") - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_page_dto_open_instance_dto.py b/python/apollo_openapi/models/open_page_dto_open_instance_dto.py deleted file mode 100644 index db43b74..0000000 --- a/python/apollo_openapi/models/open_page_dto_open_instance_dto.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenPageDTOOpenInstanceDTO(BaseModel): - """ - 分页实例数据传输对象,用于返回分页查询的实例列表结果 - """ # noqa: E501 - page: Optional[StrictInt] = Field(default=None, description="当前页码,从0开始计数") - size: Optional[StrictInt] = Field(default=None, description="每页显示的记录数量") - total: Optional[StrictInt] = Field(default=None, description="总记录数,符合查询条件的实例总数量") - content: Optional[List[OpenInstanceDTO]] = Field(default=None, description="当前页的实例列表,包含具体的实例数据") - __properties: ClassVar[List[str]] = ["page", "size", "total", "content"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenInstanceDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in content (list) - _items = [] - if self.content: - for _item_content in self.content: - if _item_content: - _items.append(_item_content.to_dict()) - _dict['content'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenInstanceDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "page": obj.get("page"), - "size": obj.get("size"), - "total": obj.get("total"), - "content": [OpenInstanceDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_page_dto_open_item_dto.py b/python/apollo_openapi/models/open_page_dto_open_item_dto.py deleted file mode 100644 index de70d3f..0000000 --- a/python/apollo_openapi/models/open_page_dto_open_item_dto.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.open_item_dto import OpenItemDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenPageDTOOpenItemDTO(BaseModel): - """ - 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - """ # noqa: E501 - page: Optional[StrictInt] = Field(default=None, description="当前页码,从0开始计数") - size: Optional[StrictInt] = Field(default=None, description="每页显示的记录数量") - total: Optional[StrictInt] = Field(default=None, description="总记录数,符合查询条件的配置项总数量") - content: Optional[List[OpenItemDTO]] = Field(default=None, description="当前页的配置项列表,包含具体的配置项数据") - __properties: ClassVar[List[str]] = ["page", "size", "total", "content"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenItemDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in content (list) - _items = [] - if self.content: - for _item_content in self.content: - if _item_content: - _items.append(_item_content.to_dict()) - _dict['content'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenPageDTOOpenItemDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "page": obj.get("page"), - "size": obj.get("size"), - "total": obj.get("total"), - "content": [OpenItemDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/open_release_dto.py b/python/apollo_openapi/models/open_release_dto.py deleted file mode 100644 index f418497..0000000 --- a/python/apollo_openapi/models/open_release_dto.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.map_string import MapString -from typing import Optional, Set -from typing_extensions import Self - -class OpenReleaseDTO(BaseModel): - """ - Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, description="发布创建者用户名,记录是谁创建了这次发布", alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, description="发布最后修改者用户名,记录最后一次修改发布信息的用户", alias="dataChangeLastModifiedBy") - data_change_created_time: Optional[StrictStr] = Field(default=None, description="发布创建时间,ISO 8601格式的时间戳", alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, description="发布最后修改时间,ISO 8601格式的时间戳", alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = Field(default=None, description="发布记录的唯一标识符,系统自动生成") - app_id: Optional[StrictStr] = Field(default=None, description="所属应用的唯一标识符", alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, description="所属集群的名称", alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, description="所属命名空间的名称", alias="namespaceName") - name: Optional[StrictStr] = Field(default=None, description="发布名称,用于标识这次发布的版本或描述") - configurations: Optional[MapString] = None - comment: Optional[StrictStr] = Field(default=None, description="发布备注,描述本次发布的变更内容和目的") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "appId", "clusterName", "namespaceName", "name", "configurations", "comment"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of configurations - if self.configurations: - _dict['configurations'] = self.configurations.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "name": obj.get("name"), - "configurations": MapString.from_dict(obj["configurations"]) if obj.get("configurations") is not None else None, - "comment": obj.get("comment") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_apps_get401_response.py b/python/apollo_openapi/models/openapi_v1_apps_get401_response.py deleted file mode 100644 index da62fc9..0000000 --- a/python/apollo_openapi/models/openapi_v1_apps_get401_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1AppsGet401Response(BaseModel): - """ - OpenapiV1AppsGet401Response - """ # noqa: E501 - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1AppsGet401Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1AppsGet401Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_apps_post400_response.py b/python/apollo_openapi/models/openapi_v1_apps_post400_response.py deleted file mode 100644 index 3414227..0000000 --- a/python/apollo_openapi/models/openapi_v1_apps_post400_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1AppsPost400Response(BaseModel): - """ - OpenapiV1AppsPost400Response - """ # noqa: E501 - message: Optional[StrictStr] = None - exception: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["message", "exception"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPost400Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPost400Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "message": obj.get("message"), - "exception": obj.get("exception") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_apps_post_request.py b/python/apollo_openapi/models/openapi_v1_apps_post_request.py deleted file mode 100644 index 54b50b4..0000000 --- a/python/apollo_openapi/models/openapi_v1_apps_post_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from apollo_openapi.models.open_app_dto import OpenAppDTO -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1AppsPostRequest(BaseModel): - """ - - """ # noqa: E501 - app: OpenAppDTO - assign_app_role_to_self: StrictBool = Field(description="是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", alias="assignAppRoleToSelf") - admins: List[StrictStr] = Field(description="应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限") - __properties: ClassVar[List[str]] = ["assignAppRoleToSelf", "admins", "app"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPostRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of app - if self.app: - _dict['app'] = self.app.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1AppsPostRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "assignAppRoleToSelf": obj.get("assignAppRoleToSelf"), - "admins": obj.get("admins"), - "app": OpenAppDTO.from_dict(obj["app"]) if obj.get("app") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py b/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py deleted file mode 100644 index 44898fd..0000000 --- a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(BaseModel): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - """ # noqa: E501 - valid: Optional[StrictBool] = None - message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["valid", "message"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "valid": obj.get("valid"), - "message": obj.get("message") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py b/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py deleted file mode 100644 index d7c0b8c..0000000 --- a/python/apollo_openapi/models/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(BaseModel): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - """ # noqa: E501 - valid: Optional[StrictBool] = None - message: Optional[StrictStr] = None - errors: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = ["valid", "message", "errors"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "valid": obj.get("valid"), - "message": obj.get("message"), - "errors": obj.get("errors") - }) - return _obj - - diff --git a/python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py b/python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py deleted file mode 100644 index bb4936f..0000000 --- a/python/apollo_openapi/models/openapi_v1_envs_env_releases_compare_get200_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from apollo_openapi.models.change import Change -from typing import Optional, Set -from typing_extensions import Self - -class OpenapiV1EnvsEnvReleasesCompareGet200Response(BaseModel): - """ - OpenapiV1EnvsEnvReleasesCompareGet200Response - """ # noqa: E501 - changes: Optional[List[Change]] = None - __properties: ClassVar[List[str]] = ["changes"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in changes (list) - _items = [] - if self.changes: - for _item_changes in self.changes: - if _item_changes: - _items.append(_item_changes.to_dict()) - _dict['changes'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "changes": [Change.from_dict(_item) for _item in obj["changes"]] if obj.get("changes") is not None else None - }) - return _obj - - diff --git a/python/apollo_openapi/models/release_dto.py b/python/apollo_openapi/models/release_dto.py deleted file mode 100644 index 1987e75..0000000 --- a/python/apollo_openapi/models/release_dto.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ReleaseDTO(BaseModel): - """ - ReleaseDTO - """ # noqa: E501 - data_change_created_by: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedBy") - data_change_last_modified_by: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedBy") - data_change_created_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedByDisplayName") - data_change_last_modified_by_display_name: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedByDisplayName") - data_change_created_time: Optional[StrictStr] = Field(default=None, alias="dataChangeCreatedTime") - data_change_last_modified_time: Optional[StrictStr] = Field(default=None, alias="dataChangeLastModifiedTime") - id: Optional[StrictInt] = None - release_key: Optional[StrictStr] = Field(default=None, alias="releaseKey") - name: Optional[StrictStr] = None - app_id: Optional[StrictStr] = Field(default=None, alias="appId") - cluster_name: Optional[StrictStr] = Field(default=None, alias="clusterName") - namespace_name: Optional[StrictStr] = Field(default=None, alias="namespaceName") - configurations: Optional[StrictStr] = None - comment: Optional[StrictStr] = None - is_abandoned: Optional[StrictBool] = Field(default=None, alias="isAbandoned") - __properties: ClassVar[List[str]] = ["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "releaseKey", "name", "appId", "clusterName", "namespaceName", "configurations", "comment", "isAbandoned"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ReleaseDTO from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ReleaseDTO from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataChangeCreatedBy": obj.get("dataChangeCreatedBy"), - "dataChangeLastModifiedBy": obj.get("dataChangeLastModifiedBy"), - "dataChangeCreatedByDisplayName": obj.get("dataChangeCreatedByDisplayName"), - "dataChangeLastModifiedByDisplayName": obj.get("dataChangeLastModifiedByDisplayName"), - "dataChangeCreatedTime": obj.get("dataChangeCreatedTime"), - "dataChangeLastModifiedTime": obj.get("dataChangeLastModifiedTime"), - "id": obj.get("id"), - "releaseKey": obj.get("releaseKey"), - "name": obj.get("name"), - "appId": obj.get("appId"), - "clusterName": obj.get("clusterName"), - "namespaceName": obj.get("namespaceName"), - "configurations": obj.get("configurations"), - "comment": obj.get("comment"), - "isAbandoned": obj.get("isAbandoned") - }) - return _obj - - diff --git a/python/apollo_openapi/py.typed b/python/apollo_openapi/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/python/apollo_openapi/rest.py b/python/apollo_openapi/rest.py deleted file mode 100644 index cad1090..0000000 --- a/python/apollo_openapi/rest.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from apollo_openapi.exceptions import ApiException, ApiValueError - -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } - if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options - - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize - - # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) - else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. - elif isinstance(body, str) or isinstance(body, bytes): - r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=False, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/python/docs/AppManagementApi.md b/python/docs/AppManagementApi.md deleted file mode 100644 index dae6308..0000000 --- a/python/docs/AppManagementApi.md +++ /dev/null @@ -1,1067 +0,0 @@ -# apollo_openapi.AppManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_apps_app_id_appnamespaces_namespace_name_delete**](AppManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_delete) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace -[**openapi_v1_apps_app_id_delete**](AppManagementApi.md#openapi_v1_apps_app_id_delete) | **DELETE** /openapi/v1/apps/{appId} | 删除应用 -[**openapi_v1_apps_app_id_env_clusters_get**](AppManagementApi.md#openapi_v1_apps_app_id_env_clusters_get) | **GET** /openapi/v1/apps/{appId}/env-clusters | 获取应用的环境集群信息 -[**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete**](AppManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace -[**openapi_v1_apps_app_id_get**](AppManagementApi.md#openapi_v1_apps_app_id_get) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息 -[**openapi_v1_apps_app_id_miss_envs_get**](AppManagementApi.md#openapi_v1_apps_app_id_miss_envs_get) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境 -[**openapi_v1_apps_app_id_namespaces_releases_status_get**](AppManagementApi.md#openapi_v1_apps_app_id_namespaces_releases_status_get) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 -[**openapi_v1_apps_app_id_navtree_get**](AppManagementApi.md#openapi_v1_apps_app_id_navtree_get) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树 -[**openapi_v1_apps_app_id_put**](AppManagementApi.md#openapi_v1_apps_app_id_put) | **PUT** /openapi/v1/apps/{appId} | 更新应用 -[**openapi_v1_apps_by_self_get**](AppManagementApi.md#openapi_v1_apps_by_self_get) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页) -[**openapi_v1_apps_envs_env_post**](AppManagementApi.md#openapi_v1_apps_envs_env_post) | **POST** /openapi/v1/apps/envs/{env} | 在指定环境创建应用 -[**openapi_v1_apps_get**](AppManagementApi.md#openapi_v1_apps_get) | **GET** /openapi/v1/apps | 获取当前Consumer授权的应用列表 -[**openapi_v1_apps_post**](AppManagementApi.md#openapi_v1_apps_post) | **POST** /openapi/v1/apps | 创建应用 - - -# **openapi_v1_apps_app_id_appnamespaces_namespace_name_delete** -> object openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(app_id, namespace_name) - -删除AppNamespace - -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 删除AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(app_id, namespace_name) - print("The response of AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **namespace_name** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_delete** -> OpenapiV1AppsGet401Response openapi_v1_apps_app_id_delete(app_id) - -删除应用 - -DELETE /openapi/v1/apps/{appId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 删除应用 - api_response = api_instance.openapi_v1_apps_app_id_delete(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 应用删除成功 | - | -**403** | 权限不足,需要超级管理员权限 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[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_apps_app_id_env_clusters_get** -> List[OpenEnvClusterDTO] openapi_v1_apps_app_id_env_clusters_get(app_id) - -获取应用的环境集群信息 - -GET /openapi/v1/apps/{appId}/env-clusters - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取应用的环境集群信息 - api_response = api_instance.openapi_v1_apps_app_id_env_clusters_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_env_clusters_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_env_clusters_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**List[OpenEnvClusterDTO]**](OpenEnvClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用环境集群信息 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete** -> object openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete(app_id, env, cluster_name, namespace_name) - -删除关联的Namespace - -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 删除关联的Namespace - api_response = api_instance.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete(app_id, env, cluster_name, namespace_name) - print("The response of AppManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_get** -> OpenAppDTO openapi_v1_apps_app_id_get(app_id) - -获取单个应用信息 - -GET /openapi/v1/apps/{appId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取单个应用信息 - api_response = api_instance.openapi_v1_apps_app_id_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用信息 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[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_apps_app_id_miss_envs_get** -> List[str] openapi_v1_apps_app_id_miss_envs_get(app_id) - -查找缺失的环境 - -GET /openapi/v1/apps/{appId}/miss_envs - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 查找缺失的环境 - api_response = api_instance.openapi_v1_apps_app_id_miss_envs_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_miss_envs_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_miss_envs_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -**List[str]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用缺失的环境列表 | - | -**404** | 应用不存在 | - | - -[[Back to top]](#) [[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_apps_app_id_namespaces_releases_status_get** -> Dict[str, Dict[str, bool]] openapi_v1_apps_app_id_namespaces_releases_status_get(app_id) - -获取应用下所有Namespace的发布状态 - -GET /openapi/v1/apps/{appId}/namespaces/releases/status - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取应用下所有Namespace的发布状态 - api_response = api_instance.openapi_v1_apps_app_id_namespaces_releases_status_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_namespaces_releases_status_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_namespaces_releases_status_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -**Dict[str, Dict[str, bool]]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_navtree_get** -> List[EnvClusterInfo] openapi_v1_apps_app_id_navtree_get(app_id) - -获取应用导航树 - -GET /openapi/v1/apps/{appId}/navtree - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.env_cluster_info import EnvClusterInfo -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取应用导航树 - api_response = api_instance.openapi_v1_apps_app_id_navtree_get(app_id) - print("The response of AppManagementApi->openapi_v1_apps_app_id_navtree_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_navtree_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**List[EnvClusterInfo]**](EnvClusterInfo.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取应用导航树 | - | - -[[Back to top]](#) [[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_apps_app_id_put** -> OpenAppDTO openapi_v1_apps_app_id_put(app_id, open_app_dto) - -更新应用 - -PUT /openapi/v1/apps/{appId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - app_id = 'app_id_example' # str | - open_app_dto = apollo_openapi.OpenAppDTO() # OpenAppDTO | - - try: - # 更新应用 - api_response = api_instance.openapi_v1_apps_app_id_put(app_id, open_app_dto) - print("The response of AppManagementApi->openapi_v1_apps_app_id_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_app_id_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **open_app_dto** | [**OpenAppDTO**](OpenAppDTO.md)| | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_apps_by_self_get** -> List[OpenAppDTO] openapi_v1_apps_by_self_get() - -获取当前Consumer的应用列表(分页) - -GET /openapi/v1/apps/by-self - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - - try: - # 获取当前Consumer的应用列表(分页) - api_response = api_instance.openapi_v1_apps_by_self_get() - print("The response of AppManagementApi->openapi_v1_apps_by_self_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_by_self_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[OpenAppDTO]**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取Consumer的应用列表 | - | -**401** | 未授权访问 | - | - -[[Back to top]](#) [[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_apps_envs_env_post** -> OpenapiV1AppsGet401Response openapi_v1_apps_envs_env_post(env, open_app_dto) - -在指定环境创建应用 - -POST /openapi/v1/apps/envs/{env} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - env = 'env_example' # str | - open_app_dto = apollo_openapi.OpenAppDTO() # OpenAppDTO | - - try: - # 在指定环境创建应用 - api_response = api_instance.openapi_v1_apps_envs_env_post(env, open_app_dto) - print("The response of AppManagementApi->openapi_v1_apps_envs_env_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_envs_env_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **open_app_dto** | [**OpenAppDTO**](OpenAppDTO.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 应用在指定环境创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_apps_get** -> List[OpenAppDTO] openapi_v1_apps_get(authorized=authorized) - -获取当前Consumer授权的应用列表 - -GET /openapi/v1/apps?authorized=true - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - authorized = 'true' # str | 是否只返回授权的应用 (optional) - - try: - # 获取当前Consumer授权的应用列表 - api_response = api_instance.openapi_v1_apps_get(authorized=authorized) - print("The response of AppManagementApi->openapi_v1_apps_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **authorized** | **str**| 是否只返回授权的应用 | [optional] - -### Return type - -[**List[OpenAppDTO]**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取授权应用列表 | - | -**401** | 未授权访问 | - | - -[[Back to top]](#) [[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_apps_post** -> OpenAppDTO openapi_v1_apps_post(openapi_v1_apps_post_request) - -创建应用 - -POST /openapi/v1/apps - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_dto import OpenAppDTO -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.AppManagementApi(api_client) - openapi_v1_apps_post_request = apollo_openapi.OpenapiV1AppsPostRequest() # OpenapiV1AppsPostRequest | - - try: - # 创建应用 - api_response = api_instance.openapi_v1_apps_post(openapi_v1_apps_post_request) - print("The response of AppManagementApi->openapi_v1_apps_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AppManagementApi->openapi_v1_apps_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **openapi_v1_apps_post_request** | [**OpenapiV1AppsPostRequest**](OpenapiV1AppsPostRequest.md)| | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 应用创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/Change.md b/python/docs/Change.md deleted file mode 100644 index 7d79f7e..0000000 --- a/python/docs/Change.md +++ /dev/null @@ -1,30 +0,0 @@ -# Change - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | **str** | | [optional] -**entity** | [**EntityPairKVEntity**](EntityPairKVEntity.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.change import Change - -# TODO update the JSON string below -json = "{}" -# create an instance of Change from a JSON string -change_instance = Change.from_json(json) -# print the JSON string representation of the object -print(Change.to_json()) - -# convert the object into a dict -change_dict = change_instance.to_dict() -# create an instance of Change from a dict -change_from_dict = Change.from_dict(change_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ClusterDTO.md b/python/docs/ClusterDTO.md deleted file mode 100644 index 86c91e6..0000000 --- a/python/docs/ClusterDTO.md +++ /dev/null @@ -1,39 +0,0 @@ -# ClusterDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**id** | **int** | | [optional] -**name** | **str** | | -**app_id** | **str** | | -**parent_cluster_id** | **int** | | [optional] -**comment** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.cluster_dto import ClusterDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ClusterDTO from a JSON string -cluster_dto_instance = ClusterDTO.from_json(json) -# print the JSON string representation of the object -print(ClusterDTO.to_json()) - -# convert the object into a dict -cluster_dto_dict = cluster_dto_instance.to_dict() -# create an instance of ClusterDTO from a dict -cluster_dto_from_dict = ClusterDTO.from_dict(cluster_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ClusterManagementApi.md b/python/docs/ClusterManagementApi.md deleted file mode 100644 index a3d9d86..0000000 --- a/python/docs/ClusterManagementApi.md +++ /dev/null @@ -1,437 +0,0 @@ -# apollo_openapi.ClusterManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_apps_app_id_clusters_cluster_name_get**](ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 -[**openapi_v1_apps_app_id_clusters_post**](ClusterManagementApi.md#openapi_v1_apps_app_id_clusters_post) | **POST** /openapi/v1/apps/{appId}/clusters | 创建集群 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete**](ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get**](ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get**](ClusterManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace - - -# **openapi_v1_apps_app_id_clusters_cluster_name_get** -> OpenClusterDTO openapi_v1_apps_app_id_clusters_cluster_name_get(app_id, cluster_name) - -获取指定集群信息 - -GET /openapi/v1/apps/{appId}/clusters/{clusterName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - - try: - # 获取指定集群信息 - api_response = api_instance.openapi_v1_apps_app_id_clusters_cluster_name_get(app_id, cluster_name) - print("The response of ClusterManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **cluster_name** | **str**| | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取集群信息 | - | -**404** | 集群不存在 | - | - -[[Back to top]](#) [[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_apps_app_id_clusters_post** -> OpenClusterDTO openapi_v1_apps_app_id_clusters_post(app_id, open_cluster_dto) - -创建集群 - -POST /openapi/v1/apps/{appId}/clusters - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - open_cluster_dto = apollo_openapi.OpenClusterDTO() # OpenClusterDTO | - - try: - # 创建集群 - api_response = api_instance.openapi_v1_apps_app_id_clusters_post(app_id, open_cluster_dto) - print("The response of ClusterManagementApi->openapi_v1_apps_app_id_clusters_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_apps_app_id_clusters_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **open_cluster_dto** | [**OpenClusterDTO**](OpenClusterDTO.md)| | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 集群创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_delete** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete(env, app_id, cluster_name) - -删除集群 - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - - try: - # 删除集群 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete(env, app_id, cluster_name) - print("The response of ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 集群删除成功 | - | -**400** | 删除失败,集群可能包含配置 | - | -**403** | 权限不足 | - | -**404** | 集群不存在 | - | - -[[Back to top]](#) [[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_branches_get** -> OpenNamespaceDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get(app_id, env, cluster_name, namespace_name) - -获取命名空间分支信息 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取命名空间分支信息 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get(app_id, env, cluster_name, namespace_name) - print("The response of ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | -**404** | 分支不存在 | - | - -[[Back to top]](#) [[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_get** -> OpenNamespaceDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get(app_id, env, cluster_name, namespace_name, fill_item_detail) - -获取指定的Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ClusterManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - fill_item_detail = true # bool | - - try: - # 获取指定的Namespace - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get(app_id, env, cluster_name, namespace_name, fill_item_detail) - print("The response of ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ClusterManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **fill_item_detail** | **bool**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/EntityPairKVEntity.md b/python/docs/EntityPairKVEntity.md deleted file mode 100644 index bcf9fbe..0000000 --- a/python/docs/EntityPairKVEntity.md +++ /dev/null @@ -1,30 +0,0 @@ -# EntityPairKVEntity - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_entity** | [**KVEntity**](KVEntity.md) | | [optional] -**second_entity** | [**KVEntity**](KVEntity.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity - -# TODO update the JSON string below -json = "{}" -# create an instance of EntityPairKVEntity from a JSON string -entity_pair_kv_entity_instance = EntityPairKVEntity.from_json(json) -# print the JSON string representation of the object -print(EntityPairKVEntity.to_json()) - -# convert the object into a dict -entity_pair_kv_entity_dict = entity_pair_kv_entity_instance.to_dict() -# create an instance of EntityPairKVEntity from a dict -entity_pair_kv_entity_from_dict = EntityPairKVEntity.from_dict(entity_pair_kv_entity_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/EnvClusterInfo.md b/python/docs/EnvClusterInfo.md deleted file mode 100644 index ef7a147..0000000 --- a/python/docs/EnvClusterInfo.md +++ /dev/null @@ -1,30 +0,0 @@ -# EnvClusterInfo - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env** | **str** | | [optional] -**clusters** | [**List[ClusterDTO]**](ClusterDTO.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.env_cluster_info import EnvClusterInfo - -# TODO update the JSON string below -json = "{}" -# create an instance of EnvClusterInfo from a JSON string -env_cluster_info_instance = EnvClusterInfo.from_json(json) -# print the JSON string representation of the object -print(EnvClusterInfo.to_json()) - -# convert the object into a dict -env_cluster_info_dict = env_cluster_info_instance.to_dict() -# create an instance of EnvClusterInfo from a dict -env_cluster_info_from_dict = EnvClusterInfo.from_dict(env_cluster_info_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/InstanceManagementApi.md b/python/docs/InstanceManagementApi.md deleted file mode 100644 index 98cf194..0000000 --- a/python/docs/InstanceManagementApi.md +++ /dev/null @@ -1,265 +0,0 @@ -# apollo_openapi.InstanceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](InstanceManagementApi.md#openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get**](InstanceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 查询不在指定发布版本中的实例 -[**openapi_v1_envs_env_releases_release_id_instances_get**](InstanceManagementApi.md#openapi_v1_envs_env_releases_release_id_instances_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) - - -# **openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get** -> int openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(app_id, cluster_name, namespace_name) - -获取命名空间下的实例数量 - -GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.InstanceManagementApi(api_client) - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取命名空间下的实例数量 - api_response = api_instance.openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(app_id, cluster_name, namespace_name) - print("The response of InstanceManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InstanceManagementApi->openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -**int** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_get** -> List[OpenInstanceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(env, app_id, cluster_name, namespace_name, exclude_releases=exclude_releases) - -查询不在指定发布版本中的实例 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.InstanceManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - exclude_releases = 'exclude_releases_example' # str | 排除的发布ID列表,用逗号分隔 (optional) - - try: - # 查询不在指定发布版本中的实例 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(env, app_id, cluster_name, namespace_name, exclude_releases=exclude_releases) - print("The response of InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **exclude_releases** | **str**| 排除的发布ID列表,用逗号分隔 | [optional] - -### Return type - -[**List[OpenInstanceDTO]**](OpenInstanceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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(env, release_id, page, size) - -根据发布版本查询实例(支持分页) - -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.InstanceManagementApi(api_client) - env = 'env_example' # str | - release_id = 56 # int | - page = 0 # int | - size = 20 # int | - - try: - # 根据发布版本查询实例(支持分页) - api_response = api_instance.openapi_v1_envs_env_releases_release_id_instances_get(env, release_id, page, size) - print("The response of InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling InstanceManagementApi->openapi_v1_envs_env_releases_release_id_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **release_id** | **int**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/ItemChangeSets.md b/python/docs/ItemChangeSets.md deleted file mode 100644 index f5697ea..0000000 --- a/python/docs/ItemChangeSets.md +++ /dev/null @@ -1,37 +0,0 @@ -# ItemChangeSets - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**create_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] [default to []] -**update_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] [default to []] -**delete_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] [default to []] - -## Example - -```python -from apollo_openapi.models.item_change_sets import ItemChangeSets - -# TODO update the JSON string below -json = "{}" -# create an instance of ItemChangeSets from a JSON string -item_change_sets_instance = ItemChangeSets.from_json(json) -# print the JSON string representation of the object -print(ItemChangeSets.to_json()) - -# convert the object into a dict -item_change_sets_dict = item_change_sets_instance.to_dict() -# create an instance of ItemChangeSets from a dict -item_change_sets_from_dict = ItemChangeSets.from_dict(item_change_sets_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ItemDTO.md b/python/docs/ItemDTO.md deleted file mode 100644 index 77b6a2e..0000000 --- a/python/docs/ItemDTO.md +++ /dev/null @@ -1,41 +0,0 @@ -# ItemDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**id** | **int** | | [optional] -**namespace_id** | **int** | | [optional] -**key** | **str** | | [optional] -**type** | **int** | | [optional] -**value** | **str** | | [optional] -**comment** | **str** | | [optional] -**line_num** | **int** | | [optional] - -## Example - -```python -from apollo_openapi.models.item_dto import ItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ItemDTO from a JSON string -item_dto_instance = ItemDTO.from_json(json) -# print the JSON string representation of the object -print(ItemDTO.to_json()) - -# convert the object into a dict -item_dto_dict = item_dto_instance.to_dict() -# create an instance of ItemDTO from a dict -item_dto_from_dict = ItemDTO.from_dict(item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ItemManagementApi.md b/python/docs/ItemManagementApi.md deleted file mode 100644 index 23a4e71..0000000 --- a/python/docs/ItemManagementApi.md +++ /dev/null @@ -1,1186 +0,0 @@ -# apollo_openapi.ItemManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate | 通过文本批量修改配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare | 对比命名空间配置差异 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert | 撤销配置项更改 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync | 同步配置项到多个命名空间 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post**](ItemManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate | 验证配置文本语法 - - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - -通过编码的key删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - operator = 'operator_example' # str | - - try: - # 通过编码的key删除配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_encoded_items_key_get** -> OpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get(app_id, env, cluster_name, namespace_name, key) - -通过查询参数获取配置项(支持编码的key) - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - - try: - # 通过查询参数获取配置项(支持编码的key) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get(app_id, env, cluster_name, namespace_name, key) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取配置项(支持编码key) | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[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_encoded_items_key_put** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - -通过编码的key更新配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - create_if_not_exists = false # bool | - open_item_dto = apollo_openapi.OpenItemDTO() # OpenItemDTO | - - try: - # 通过编码的key更新配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **create_if_not_exists** | **bool**| | - **open_item_dto** | [**OpenItemDTO**](OpenItemDTO.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项更新成功(编码key) | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[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_items_batch_update_put** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put(app_id, env, cluster_name, namespace_name, namespace_text_model) - -通过文本批量修改配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_text_model = apollo_openapi.NamespaceTextModel() # NamespaceTextModel | - - try: - # 通过文本批量修改配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put(app_id, env, cluster_name, namespace_name, namespace_text_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_text_model** | [**NamespaceTextModel**](NamespaceTextModel.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 批量更新配置项成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_items_compare_post** -> List[ListItemDiffs] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - -对比命名空间配置差异 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.list_item_diffs import ListItemDiffs -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_sync_model = apollo_openapi.NamespaceSyncModel() # NamespaceSyncModel | - - try: - # 对比命名空间配置差异 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_sync_model** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | - -### Return type - -[**List[ListItemDiffs]**](ListItemDiffs.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功对比命名空间配置差异 | - | - -[[Back to top]](#) [[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_items_get** -> OpenPageDTOOpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get(app_id, env, cluster_name, namespace_name, page, size) - -获取命名空间下的配置项列表 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - page = 0 # int | - size = 50 # int | - - try: - # 获取命名空间下的配置项列表 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get(app_id, env, cluster_name, namespace_name, page, size) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**OpenPageDTOOpenItemDTO**](OpenPageDTOOpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取配置项列表 | - | -**404** | 命名空间不存在 | - | - -[[Back to top]](#) [[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_items_key_delete** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - -删除配置项 - -DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - operator = 'operator_example' # str | - - try: - # 删除配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete(app_id, env, cluster_name, namespace_name, key, operator) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_items_key_get** -> OpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get(app_id, env, cluster_name, namespace_name, key) - -获取单个配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - - try: - # 获取单个配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get(app_id, env, cluster_name, namespace_name, key) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取配置项 | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[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_items_key_put** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - -更新配置项 - -PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - key = 'key_example' # str | - create_if_not_exists = false # bool | - open_item_dto = apollo_openapi.OpenItemDTO() # OpenItemDTO | - - try: - # 更新配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put(app_id, env, cluster_name, namespace_name, key, create_if_not_exists, open_item_dto) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **key** | **str**| | - **create_if_not_exists** | **bool**| | - **open_item_dto** | [**OpenItemDTO**](OpenItemDTO.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项更新成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | -**404** | 配置项不存在 | - | - -[[Back to top]](#) [[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_items_post** -> OpenItemDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post(app_id, env, cluster_name, namespace_name, open_item_dto) - -创建新的配置项 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - open_item_dto = apollo_openapi.OpenItemDTO() # OpenItemDTO | - - try: - # 创建新的配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post(app_id, env, cluster_name, namespace_name, open_item_dto) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **open_item_dto** | [**OpenItemDTO**](OpenItemDTO.md)| | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_items_revert_post** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post(app_id, env, cluster_name, namespace_name) - -撤销配置项更改 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 撤销配置项更改 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post(app_id, env, cluster_name, namespace_name) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项更改撤销成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_items_sync_post** -> OpenapiV1AppsGet401Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - -同步配置项到多个命名空间 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_sync_model = apollo_openapi.NamespaceSyncModel() # NamespaceSyncModel | - - try: - # 同步配置项到多个命名空间 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post(app_id, env, cluster_name, namespace_name, namespace_sync_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_sync_model** | [**NamespaceSyncModel**](NamespaceSyncModel.md)| | - -### Return type - -[**OpenapiV1AppsGet401Response**](OpenapiV1AppsGet401Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置项同步成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_items_validate_post** -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post(app_id, env, cluster_name, namespace_name, namespace_text_model) - -验证配置文本语法 - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_text_model import NamespaceTextModel -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ItemManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_text_model = apollo_openapi.NamespaceTextModel() # NamespaceTextModel | - - try: - # 验证配置文本语法 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post(app_id, env, cluster_name, namespace_name, namespace_text_model) - print("The response of ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ItemManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_text_model** | [**NamespaceTextModel**](NamespaceTextModel.md)| | - -### Return type - -[**OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response**](OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 配置文本语法验证通过 | - | -**400** | 配置文本语法错误 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/KVEntity.md b/python/docs/KVEntity.md deleted file mode 100644 index d767177..0000000 --- a/python/docs/KVEntity.md +++ /dev/null @@ -1,30 +0,0 @@ -# KVEntity - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] -**value** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.kv_entity import KVEntity - -# TODO update the JSON string below -json = "{}" -# create an instance of KVEntity from a JSON string -kv_entity_instance = KVEntity.from_json(json) -# print the JSON string representation of the object -print(KVEntity.to_json()) - -# convert the object into a dict -kv_entity_dict = kv_entity_instance.to_dict() -# create an instance of KVEntity from a dict -kv_entity_from_dict = KVEntity.from_dict(kv_entity_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListItemDiffs.md b/python/docs/ListItemDiffs.md deleted file mode 100644 index 48028bd..0000000 --- a/python/docs/ListItemDiffs.md +++ /dev/null @@ -1,31 +0,0 @@ -# ListItemDiffs - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | [**NamespaceIdentifier**](NamespaceIdentifier.md) | | [optional] -**diffs** | [**ItemChangeSets**](ItemChangeSets.md) | | [optional] -**ext_info** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.list_item_diffs import ListItemDiffs - -# TODO update the JSON string below -json = "{}" -# create an instance of ListItemDiffs from a JSON string -list_item_diffs_instance = ListItemDiffs.from_json(json) -# print the JSON string representation of the object -print(ListItemDiffs.to_json()) - -# convert the object into a dict -list_item_diffs_dict = list_item_diffs_instance.to_dict() -# create an instance of ListItemDiffs from a dict -list_item_diffs_from_dict = ListItemDiffs.from_dict(list_item_diffs_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ListReleaseBO.md b/python/docs/ListReleaseBO.md deleted file mode 100644 index da94c58..0000000 --- a/python/docs/ListReleaseBO.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListReleaseBO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**base_info** | [**ReleaseDTO**](ReleaseDTO.md) | | [optional] -**items** | [**List[KVEntity]**](KVEntity.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.list_release_bo import ListReleaseBO - -# TODO update the JSON string below -json = "{}" -# create an instance of ListReleaseBO from a JSON string -list_release_bo_instance = ListReleaseBO.from_json(json) -# print the JSON string representation of the object -print(ListReleaseBO.to_json()) - -# convert the object into a dict -list_release_bo_dict = list_release_bo_instance.to_dict() -# create an instance of ListReleaseBO from a dict -list_release_bo_from_dict = ListReleaseBO.from_dict(list_release_bo_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/MapString.md b/python/docs/MapString.md deleted file mode 100644 index b99798f..0000000 --- a/python/docs/MapString.md +++ /dev/null @@ -1,30 +0,0 @@ -# MapString - -字符串映射对象,用于表示键值对的配置数据结构 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.map_string import MapString - -# TODO update the JSON string below -json = "{}" -# create an instance of MapString from a JSON string -map_string_instance = MapString.from_json(json) -# print the JSON string representation of the object -print(MapString.to_json()) - -# convert the object into a dict -map_string_dict = map_string_instance.to_dict() -# create an instance of MapString from a dict -map_string_from_dict = MapString.from_dict(map_string_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceBranchManagementApi.md b/python/docs/NamespaceBranchManagementApi.md deleted file mode 100644 index 0b34f71..0000000 --- a/python/docs/NamespaceBranchManagementApi.md +++ /dev/null @@ -1,828 +0,0 @@ -# apollo_openapi.NamespaceBranchManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch | 创建命名空间分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 获取分支灰度发布规则 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules | 更新分支灰度发布规则 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post**](NamespaceBranchManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 - - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post** -> OpenNamespaceDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post(app_id, env, cluster_name, namespace_name, operator) - -创建命名空间分支 - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - operator = 'operator_example' # str | - - try: - # 创建命名空间分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post(app_id, env, cluster_name, namespace_name, operator) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **operator** | **str**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_branches_branch_name_delete** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete(env, app_id, cluster_name, namespace_name, branch_name, operator) - -删除命名空间分支 - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - operator = 'operator_example' # str | - - try: - # 删除命名空间分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete(env, app_id, cluster_name, namespace_name, branch_name, operator) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_branches_branch_name_gray_del_releases_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_gray_del_release_dto) - -创建灰度删除发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - namespace_gray_del_release_dto = apollo_openapi.NamespaceGrayDelReleaseDTO() # NamespaceGrayDelReleaseDTO | - - try: - # 创建灰度删除发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_gray_del_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **namespace_gray_del_release_dto** | [**NamespaceGrayDelReleaseDTO**](NamespaceGrayDelReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_branches_branch_name_gray_rules_get** -> OpenGrayReleaseRuleDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get(app_id, env, cluster_name, namespace_name, branch_name) - -获取分支灰度发布规则 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - - try: - # 获取分支灰度发布规则 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get(app_id, env, cluster_name, namespace_name, branch_name) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - -### Return type - -[**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_branches_branch_name_gray_rules_put** -> object openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put(app_id, env, cluster_name, namespace_name, branch_name, operator, open_gray_release_rule_dto) - -更新分支灰度发布规则 - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - operator = 'operator_example' # str | - open_gray_release_rule_dto = apollo_openapi.OpenGrayReleaseRuleDTO() # OpenGrayReleaseRuleDTO | - - try: - # 更新分支灰度发布规则 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put(app_id, env, cluster_name, namespace_name, branch_name, operator, open_gray_release_rule_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **operator** | **str**| | - **open_gray_release_rule_dto** | [**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md)| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_branches_branch_name_items_get** -> List[OpenItemDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get(app_id, env, cluster_name, namespace_name, branch_name) - -获取分支下的配置项 - -GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_item_dto import OpenItemDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - - try: - # 获取分支下的配置项 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get(app_id, env, cluster_name, namespace_name, branch_name) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - -### Return type - -[**List[OpenItemDTO]**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取分支下的配置项列表 | - | -**404** | 分支不存在 | - | - -[[Back to top]](#) [[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_branches_branch_name_merge_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post(app_id, env, cluster_name, namespace_name, branch_name, delete_branch, namespace_release_dto) - -合并分支 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - delete_branch = true # bool | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 合并分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post(app_id, env, cluster_name, namespace_name, branch_name, delete_branch, namespace_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **delete_branch** | **bool**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 分支合并成功 | - | -**400** | 合并参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_branches_branch_name_patch** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch(env, app_id, cluster_name, namespace_name, branch_name, delete_branch, x_apollo_operator, namespace_release_dto) - -合并分支到主分支 - -PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - env = 'env_example' # str | - app_id = 'app_id_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - delete_branch = true # bool | - x_apollo_operator = 'x_apollo_operator_example' # str | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 合并分支到主分支 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch(env, app_id, cluster_name, namespace_name, branch_name, delete_branch, x_apollo_operator, namespace_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **app_id** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **delete_branch** | **bool**| | - **x_apollo_operator** | **str**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_branches_branch_name_releases_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_release_dto) - -创建灰度发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceBranchManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - branch_name = 'branch_name_example' # str | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 创建灰度发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post(app_id, env, cluster_name, namespace_name, branch_name, namespace_release_dto) - print("The response of NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceBranchManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **branch_name** | **str**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/NamespaceGrayDelReleaseDTO.md b/python/docs/NamespaceGrayDelReleaseDTO.md deleted file mode 100644 index 66a55ec..0000000 --- a/python/docs/NamespaceGrayDelReleaseDTO.md +++ /dev/null @@ -1,34 +0,0 @@ -# NamespaceGrayDelReleaseDTO - -命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | **str** | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] -**release_comment** | **str** | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] -**released_by** | **str** | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] -**is_emergency_publish** | **bool** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] -**gray_del_keys** | **List[str]** | 需要在灰度发布中删除的配置项键名列表 | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceGrayDelReleaseDTO from a JSON string -namespace_gray_del_release_dto_instance = NamespaceGrayDelReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(NamespaceGrayDelReleaseDTO.to_json()) - -# convert the object into a dict -namespace_gray_del_release_dto_dict = namespace_gray_del_release_dto_instance.to_dict() -# create an instance of NamespaceGrayDelReleaseDTO from a dict -namespace_gray_del_release_dto_from_dict = NamespaceGrayDelReleaseDTO.from_dict(namespace_gray_del_release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceIdentifier.md b/python/docs/NamespaceIdentifier.md deleted file mode 100644 index 66589f7..0000000 --- a/python/docs/NamespaceIdentifier.md +++ /dev/null @@ -1,32 +0,0 @@ -# NamespaceIdentifier - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | **str** | | [optional] -**env** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**namespace_name** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceIdentifier from a JSON string -namespace_identifier_instance = NamespaceIdentifier.from_json(json) -# print the JSON string representation of the object -print(NamespaceIdentifier.to_json()) - -# convert the object into a dict -namespace_identifier_dict = namespace_identifier_instance.to_dict() -# create an instance of NamespaceIdentifier from a dict -namespace_identifier_from_dict = NamespaceIdentifier.from_dict(namespace_identifier_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceManagementApi.md b/python/docs/NamespaceManagementApi.md deleted file mode 100644 index e5c3499..0000000 --- a/python/docs/NamespaceManagementApi.md +++ /dev/null @@ -1,761 +0,0 @@ -# apollo_openapi.NamespaceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_appnamespaces_get**](NamespaceManagementApi.md#openapi_v1_appnamespaces_get) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace -[**openapi_v1_apps_app_id_appnamespaces_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace -[**openapi_v1_apps_app_id_appnamespaces_namespace_name_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_namespace_name_get) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace -[**openapi_v1_apps_app_id_appnamespaces_post**](NamespaceManagementApi.md#openapi_v1_apps_app_id_appnamespaces_post) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace -[**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace -[**openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get**](NamespaceManagementApi.md#openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace -[**openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get**](NamespaceManagementApi.md#openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get**](NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get**](NamespaceManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 - - -# **openapi_v1_appnamespaces_get** -> List[OpenAppNamespaceDTO] openapi_v1_appnamespaces_get(public_only) - -获取所有公共AppNamespace - -GET /openapi/v1/appnamespaces?public=true - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - public_only = false # bool | - - try: - # 获取所有公共AppNamespace - api_response = api_instance.openapi_v1_appnamespaces_get(public_only) - print("The response of NamespaceManagementApi->openapi_v1_appnamespaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_appnamespaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **public_only** | **bool**| | - -### Return type - -[**List[OpenAppNamespaceDTO]**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_appnamespaces_get** -> List[OpenAppNamespaceDTO] openapi_v1_apps_app_id_appnamespaces_get(app_id) - -获取指定应用的AppNamespace - -GET /openapi/v1/apps/{appId}/appnamespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - - try: - # 获取指定应用的AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_get(app_id) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - -### Return type - -[**List[OpenAppNamespaceDTO]**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_appnamespaces_namespace_name_get** -> OpenAppNamespaceDTO openapi_v1_apps_app_id_appnamespaces_namespace_name_get(app_id, namespace_name) - -获取指定的AppNamespace - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取指定的AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_namespace_name_get(app_id, namespace_name) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_namespace_name_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_appnamespaces_post** -> OpenAppNamespaceDTO openapi_v1_apps_app_id_appnamespaces_post(app_id, open_app_namespace_dto) - -创建AppNamespace - -POST /openapi/v1/apps/{appId}/appnamespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - open_app_namespace_dto = apollo_openapi.OpenAppNamespaceDTO() # OpenAppNamespaceDTO | - - try: - # 创建AppNamespace - api_response = api_instance.openapi_v1_apps_app_id_appnamespaces_post(app_id, open_app_namespace_dto) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_appnamespaces_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **open_app_namespace_dto** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | AppNamespace创建成功 | - | -**400** | 请求参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get** -> List[str] openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get(app_id, env, cluster_name) - -检查缺失的Namespace - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - - try: - # 检查缺失的Namespace - api_response = api_instance.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get(app_id, env, cluster_name) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - -### Return type - -**List[str]** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get** -> OpenNamespaceDTO openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get(app_id, env, cluster_name, namespace_name) - -获取关联的公共Namespace - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取关联的公共Namespace - api_response = api_instance.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get(app_id, env, cluster_name, namespace_name) - print("The response of NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_appnamespaces_public_namespace_name_instances_get** -> List[OpenNamespaceDTO] openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get(env, public_namespace_name, page, size) - -获取公共AppNamespace的所有实例 - -GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - env = 'env_example' # str | - public_namespace_name = 'public_namespace_name_example' # str | - page = 0 # int | - size = 10 # int | - - try: - # 获取公共AppNamespace的所有实例 - api_response = api_instance.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get(env, public_namespace_name, page, size) - print("The response of NamespaceManagementApi->openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **public_namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**List[OpenNamespaceDTO]**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_get** -> List[OpenNamespaceDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get(app_id, env, cluster_name, fill_item_detail) - -获取指定集群下的所有Namespace - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - fill_item_detail = true # bool | - - try: - # 获取指定集群下的所有Namespace - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get(app_id, env, cluster_name, fill_item_detail) - print("The response of NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **fill_item_detail** | **bool**| | - -### Return type - -[**List[OpenNamespaceDTO]**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_lock_get** -> OpenNamespaceLockDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get(app_id, env, cluster_name, namespace_name) - -获取Namespace的锁状态 - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.NamespaceManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取Namespace的锁状态 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get(app_id, env, cluster_name, namespace_name) - print("The response of NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling NamespaceManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/NamespaceReleaseDTO.md b/python/docs/NamespaceReleaseDTO.md deleted file mode 100644 index 24dedfc..0000000 --- a/python/docs/NamespaceReleaseDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# NamespaceReleaseDTO - -命名空间发布请求数据传输对象,用于创建新的配置发布 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | **str** | 发布标题,用于标识这次发布的名称或版本号 | [optional] -**release_comment** | **str** | 发布备注,详细描述本次发布的变更内容和目的 | [optional] -**released_by** | **str** | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] -**is_emergency_publish** | **bool** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceReleaseDTO from a JSON string -namespace_release_dto_instance = NamespaceReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(NamespaceReleaseDTO.to_json()) - -# convert the object into a dict -namespace_release_dto_dict = namespace_release_dto_instance.to_dict() -# create an instance of NamespaceReleaseDTO from a dict -namespace_release_dto_from_dict = NamespaceReleaseDTO.from_dict(namespace_release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceSyncModel.md b/python/docs/NamespaceSyncModel.md deleted file mode 100644 index c9cfb85..0000000 --- a/python/docs/NamespaceSyncModel.md +++ /dev/null @@ -1,30 +0,0 @@ -# NamespaceSyncModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sync_to_namespaces** | [**List[NamespaceIdentifier]**](NamespaceIdentifier.md) | | [optional] -**sync_items** | [**List[ItemDTO]**](ItemDTO.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceSyncModel from a JSON string -namespace_sync_model_instance = NamespaceSyncModel.from_json(json) -# print the JSON string representation of the object -print(NamespaceSyncModel.to_json()) - -# convert the object into a dict -namespace_sync_model_dict = namespace_sync_model_instance.to_dict() -# create an instance of NamespaceSyncModel from a dict -namespace_sync_model_from_dict = NamespaceSyncModel.from_dict(namespace_sync_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/NamespaceTextModel.md b/python/docs/NamespaceTextModel.md deleted file mode 100644 index dc4b68e..0000000 --- a/python/docs/NamespaceTextModel.md +++ /dev/null @@ -1,36 +0,0 @@ -# NamespaceTextModel - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | **str** | | [optional] -**env** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**namespace_name** | **str** | | [optional] -**namespace_id** | **int** | | [optional] -**format** | **str** | | [optional] -**config_text** | **str** | | [optional] -**operator** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.namespace_text_model import NamespaceTextModel - -# TODO update the JSON string below -json = "{}" -# create an instance of NamespaceTextModel from a JSON string -namespace_text_model_instance = NamespaceTextModel.from_json(json) -# print the JSON string representation of the object -print(NamespaceTextModel.to_json()) - -# convert the object into a dict -namespace_text_model_dict = namespace_text_model_instance.to_dict() -# create an instance of NamespaceTextModel from a dict -namespace_text_model_from_dict = NamespaceTextModel.from_dict(namespace_text_model_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenAppDTO.md b/python/docs/OpenAppDTO.md deleted file mode 100644 index fbaea31..0000000 --- a/python/docs/OpenAppDTO.md +++ /dev/null @@ -1,39 +0,0 @@ -# OpenAppDTO - -Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 数据创建者用户名,记录是谁创建了这个应用 | [optional] -**data_change_last_modified_by** | **str** | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] -**data_change_created_time** | **str** | 数据创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 数据最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | **str** | 应用名称,用于显示的友好名称 | [optional] -**app_id** | **str** | 应用唯一标识符,全局唯一的应用ID | [optional] -**org_id** | **str** | 组织ID,应用所属组织的唯一标识 | [optional] -**org_name** | **str** | 组织名称,应用所属组织的显示名称 | [optional] -**owner_name** | **str** | 应用负责人姓名,应用的主要负责人 | [optional] -**owner_email** | **str** | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] - -## Example - -```python -from apollo_openapi.models.open_app_dto import OpenAppDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenAppDTO from a JSON string -open_app_dto_instance = OpenAppDTO.from_json(json) -# print the JSON string representation of the object -print(OpenAppDTO.to_json()) - -# convert the object into a dict -open_app_dto_dict = open_app_dto_instance.to_dict() -# create an instance of OpenAppDTO from a dict -open_app_dto_from_dict = OpenAppDTO.from_dict(open_app_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenAppNamespaceDTO.md b/python/docs/OpenAppNamespaceDTO.md deleted file mode 100644 index 5c84103..0000000 --- a/python/docs/OpenAppNamespaceDTO.md +++ /dev/null @@ -1,39 +0,0 @@ -# OpenAppNamespaceDTO - -Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] -**data_change_last_modified_by** | **str** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**data_change_created_time** | **str** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | **str** | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**format** | **str** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | **bool** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**append_namespace_prefix** | **bool** | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional] [default to True] -**comment** | **str** | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] - -## Example - -```python -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenAppNamespaceDTO from a JSON string -open_app_namespace_dto_instance = OpenAppNamespaceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenAppNamespaceDTO.to_json()) - -# convert the object into a dict -open_app_namespace_dto_dict = open_app_namespace_dto_instance.to_dict() -# create an instance of OpenAppNamespaceDTO from a dict -open_app_namespace_dto_from_dict = OpenAppNamespaceDTO.from_dict(open_app_namespace_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenClusterDTO.md b/python/docs/OpenClusterDTO.md deleted file mode 100644 index 9fe91e0..0000000 --- a/python/docs/OpenClusterDTO.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenClusterDTO - -Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 集群创建者用户名,记录是谁创建了这个集群 | [optional] -**data_change_last_modified_by** | **str** | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] -**data_change_created_time** | **str** | 集群创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | **str** | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] - -## Example - -```python -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenClusterDTO from a JSON string -open_cluster_dto_instance = OpenClusterDTO.from_json(json) -# print the JSON string representation of the object -print(OpenClusterDTO.to_json()) - -# convert the object into a dict -open_cluster_dto_dict = open_cluster_dto_instance.to_dict() -# create an instance of OpenClusterDTO from a dict -open_cluster_dto_from_dict = OpenClusterDTO.from_dict(open_cluster_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenCreateAppDTO.md b/python/docs/OpenCreateAppDTO.md deleted file mode 100644 index 73fe9a4..0000000 --- a/python/docs/OpenCreateAppDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenCreateAppDTO - -创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assign_app_role_to_self** | **bool** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] -**admins** | **List[str]** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] -**app** | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenCreateAppDTO from a JSON string -open_create_app_dto_instance = OpenCreateAppDTO.from_json(json) -# print the JSON string representation of the object -print(OpenCreateAppDTO.to_json()) - -# convert the object into a dict -open_create_app_dto_dict = open_create_app_dto_instance.to_dict() -# create an instance of OpenCreateAppDTO from a dict -open_create_app_dto_from_dict = OpenCreateAppDTO.from_dict(open_create_app_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenEnvClusterDTO.md b/python/docs/OpenEnvClusterDTO.md deleted file mode 100644 index 93fbefe..0000000 --- a/python/docs/OpenEnvClusterDTO.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenEnvClusterDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env** | **str** | | [optional] -**clusters** | **List[str]** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenEnvClusterDTO from a JSON string -open_env_cluster_dto_instance = OpenEnvClusterDTO.from_json(json) -# print the JSON string representation of the object -print(OpenEnvClusterDTO.to_json()) - -# convert the object into a dict -open_env_cluster_dto_dict = open_env_cluster_dto_instance.to_dict() -# create an instance of OpenEnvClusterDTO from a dict -open_env_cluster_dto_from_dict = OpenEnvClusterDTO.from_dict(open_env_cluster_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenGrayReleaseRuleDTO.md b/python/docs/OpenGrayReleaseRuleDTO.md deleted file mode 100644 index 7ec7b1c..0000000 --- a/python/docs/OpenGrayReleaseRuleDTO.md +++ /dev/null @@ -1,38 +0,0 @@ -# OpenGrayReleaseRuleDTO - -Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] -**data_change_last_modified_by** | **str** | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] -**data_change_created_time** | **str** | 灰度规则创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 灰度规则最后修改时间,ISO 8601格式的时间戳 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**cluster_name** | **str** | 所属集群的名称 | [optional] -**namespace_name** | **str** | 所属命名空间的名称 | [optional] -**branch_name** | **str** | 灰度分支名称,标识灰度发布的分支 | [optional] -**rule_items** | [**List[OpenGrayReleaseRuleItemDTO]**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] - -## Example - -```python -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenGrayReleaseRuleDTO from a JSON string -open_gray_release_rule_dto_instance = OpenGrayReleaseRuleDTO.from_json(json) -# print the JSON string representation of the object -print(OpenGrayReleaseRuleDTO.to_json()) - -# convert the object into a dict -open_gray_release_rule_dto_dict = open_gray_release_rule_dto_instance.to_dict() -# create an instance of OpenGrayReleaseRuleDTO from a dict -open_gray_release_rule_dto_from_dict = OpenGrayReleaseRuleDTO.from_dict(open_gray_release_rule_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenGrayReleaseRuleItemDTO.md b/python/docs/OpenGrayReleaseRuleItemDTO.md deleted file mode 100644 index b56d44b..0000000 --- a/python/docs/OpenGrayReleaseRuleItemDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenGrayReleaseRuleItemDTO - -Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_app_id** | **str** | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] -**client_ip_list** | **List[str]** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] -**client_label_list** | **List[str]** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] - -## Example - -```python -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenGrayReleaseRuleItemDTO from a JSON string -open_gray_release_rule_item_dto_instance = OpenGrayReleaseRuleItemDTO.from_json(json) -# print the JSON string representation of the object -print(OpenGrayReleaseRuleItemDTO.to_json()) - -# convert the object into a dict -open_gray_release_rule_item_dto_dict = open_gray_release_rule_item_dto_instance.to_dict() -# create an instance of OpenGrayReleaseRuleItemDTO from a dict -open_gray_release_rule_item_dto_from_dict = OpenGrayReleaseRuleItemDTO.from_dict(open_gray_release_rule_item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenInstanceConfigDTO.md b/python/docs/OpenInstanceConfigDTO.md deleted file mode 100644 index be1326b..0000000 --- a/python/docs/OpenInstanceConfigDTO.md +++ /dev/null @@ -1,31 +0,0 @@ -# OpenInstanceConfigDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [optional] -**release_delivery_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenInstanceConfigDTO from a JSON string -open_instance_config_dto_instance = OpenInstanceConfigDTO.from_json(json) -# print the JSON string representation of the object -print(OpenInstanceConfigDTO.to_json()) - -# convert the object into a dict -open_instance_config_dto_dict = open_instance_config_dto_instance.to_dict() -# create an instance of OpenInstanceConfigDTO from a dict -open_instance_config_dto_from_dict = OpenInstanceConfigDTO.from_dict(open_instance_config_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenInstanceDTO.md b/python/docs/OpenInstanceDTO.md deleted file mode 100644 index fdf9a36..0000000 --- a/python/docs/OpenInstanceDTO.md +++ /dev/null @@ -1,35 +0,0 @@ -# OpenInstanceDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | [optional] -**app_id** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**data_center** | **str** | | [optional] -**ip** | **str** | | [optional] -**configs** | [**List[OpenInstanceConfigDTO]**](OpenInstanceConfigDTO.md) | | [optional] -**data_change_created_time** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenInstanceDTO from a JSON string -open_instance_dto_instance = OpenInstanceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenInstanceDTO.to_json()) - -# convert the object into a dict -open_instance_dto_dict = open_instance_dto_instance.to_dict() -# create an instance of OpenInstanceDTO from a dict -open_instance_dto_from_dict = OpenInstanceDTO.from_dict(open_instance_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenItemDTO.md b/python/docs/OpenItemDTO.md deleted file mode 100644 index 6aac107..0000000 --- a/python/docs/OpenItemDTO.md +++ /dev/null @@ -1,37 +0,0 @@ -# OpenItemDTO - -Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] -**data_change_last_modified_by** | **str** | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] -**data_change_created_time** | **str** | 配置项创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] -**key** | **str** | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] -**type** | **int** | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] -**value** | **str** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] -**comment** | **str** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] - -## Example - -```python -from apollo_openapi.models.open_item_dto import OpenItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenItemDTO from a JSON string -open_item_dto_instance = OpenItemDTO.from_json(json) -# print the JSON string representation of the object -print(OpenItemDTO.to_json()) - -# convert the object into a dict -open_item_dto_dict = open_item_dto_instance.to_dict() -# create an instance of OpenItemDTO from a dict -open_item_dto_from_dict = OpenItemDTO.from_dict(open_item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenNamespaceDTO.md b/python/docs/OpenNamespaceDTO.md deleted file mode 100644 index cc553cf..0000000 --- a/python/docs/OpenNamespaceDTO.md +++ /dev/null @@ -1,40 +0,0 @@ -# OpenNamespaceDTO - -Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] -**data_change_last_modified_by** | **str** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**data_change_created_time** | **str** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**cluster_name** | **str** | 所属集群的名称 | [optional] -**namespace_name** | **str** | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] -**comment** | **str** | 命名空间备注说明,描述命名空间的用途 | [optional] -**format** | **str** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | **bool** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**items** | [**List[OpenItemDTO]**](OpenItemDTO.md) | 命名空间包含的配置项列表 | [optional] - -## Example - -```python -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenNamespaceDTO from a JSON string -open_namespace_dto_instance = OpenNamespaceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenNamespaceDTO.to_json()) - -# convert the object into a dict -open_namespace_dto_dict = open_namespace_dto_instance.to_dict() -# create an instance of OpenNamespaceDTO from a dict -open_namespace_dto_from_dict = OpenNamespaceDTO.from_dict(open_namespace_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenNamespaceLockDTO.md b/python/docs/OpenNamespaceLockDTO.md deleted file mode 100644 index 38ec082..0000000 --- a/python/docs/OpenNamespaceLockDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenNamespaceLockDTO - -Apollo命名空间锁状态数据传输对象 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace_name** | **str** | 命名空间名称 | [optional] -**is_locked** | **bool** | 是否被锁定 | [optional] -**locked_by** | **str** | 锁定者用户名 | [optional] - -## Example - -```python -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenNamespaceLockDTO from a JSON string -open_namespace_lock_dto_instance = OpenNamespaceLockDTO.from_json(json) -# print the JSON string representation of the object -print(OpenNamespaceLockDTO.to_json()) - -# convert the object into a dict -open_namespace_lock_dto_dict = open_namespace_lock_dto_instance.to_dict() -# create an instance of OpenNamespaceLockDTO from a dict -open_namespace_lock_dto_from_dict = OpenNamespaceLockDTO.from_dict(open_namespace_lock_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenOrganizationDto.md b/python/docs/OpenOrganizationDto.md deleted file mode 100644 index c8e9991..0000000 --- a/python/docs/OpenOrganizationDto.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenOrganizationDto - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**org_id** | **str** | | [optional] -**org_name** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenOrganizationDto from a JSON string -open_organization_dto_instance = OpenOrganizationDto.from_json(json) -# print the JSON string representation of the object -print(OpenOrganizationDto.to_json()) - -# convert the object into a dict -open_organization_dto_dict = open_organization_dto_instance.to_dict() -# create an instance of OpenOrganizationDto from a dict -open_organization_dto_from_dict = OpenOrganizationDto.from_dict(open_organization_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenPageDTOOpenInstanceDTO.md b/python/docs/OpenPageDTOOpenInstanceDTO.md deleted file mode 100644 index 8008300..0000000 --- a/python/docs/OpenPageDTOOpenInstanceDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# OpenPageDTOOpenInstanceDTO - -分页实例数据传输对象,用于返回分页查询的实例列表结果 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | **int** | 当前页码,从0开始计数 | [optional] -**size** | **int** | 每页显示的记录数量 | [optional] -**total** | **int** | 总记录数,符合查询条件的实例总数量 | [optional] -**content** | [**List[OpenInstanceDTO]**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] - -## Example - -```python -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenPageDTOOpenInstanceDTO from a JSON string -open_page_dto_open_instance_dto_instance = OpenPageDTOOpenInstanceDTO.from_json(json) -# print the JSON string representation of the object -print(OpenPageDTOOpenInstanceDTO.to_json()) - -# convert the object into a dict -open_page_dto_open_instance_dto_dict = open_page_dto_open_instance_dto_instance.to_dict() -# create an instance of OpenPageDTOOpenInstanceDTO from a dict -open_page_dto_open_instance_dto_from_dict = OpenPageDTOOpenInstanceDTO.from_dict(open_page_dto_open_instance_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenPageDTOOpenItemDTO.md b/python/docs/OpenPageDTOOpenItemDTO.md deleted file mode 100644 index 07f8488..0000000 --- a/python/docs/OpenPageDTOOpenItemDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# OpenPageDTOOpenItemDTO - -分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | **int** | 当前页码,从0开始计数 | [optional] -**size** | **int** | 每页显示的记录数量 | [optional] -**total** | **int** | 总记录数,符合查询条件的配置项总数量 | [optional] -**content** | [**List[OpenItemDTO]**](OpenItemDTO.md) | 当前页的配置项列表,包含具体的配置项数据 | [optional] - -## Example - -```python -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenPageDTOOpenItemDTO from a JSON string -open_page_dto_open_item_dto_instance = OpenPageDTOOpenItemDTO.from_json(json) -# print the JSON string representation of the object -print(OpenPageDTOOpenItemDTO.to_json()) - -# convert the object into a dict -open_page_dto_open_item_dto_dict = open_page_dto_open_item_dto_instance.to_dict() -# create an instance of OpenPageDTOOpenItemDTO from a dict -open_page_dto_open_item_dto_from_dict = OpenPageDTOOpenItemDTO.from_dict(open_page_dto_open_item_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenReleaseDTO.md b/python/docs/OpenReleaseDTO.md deleted file mode 100644 index a6cd254..0000000 --- a/python/docs/OpenReleaseDTO.md +++ /dev/null @@ -1,40 +0,0 @@ -# OpenReleaseDTO - -Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | 发布创建者用户名,记录是谁创建了这次发布 | [optional] -**data_change_last_modified_by** | **str** | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] -**data_change_created_time** | **str** | 发布创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | **str** | 发布最后修改时间,ISO 8601格式的时间戳 | [optional] -**id** | **int** | 发布记录的唯一标识符,系统自动生成 | [optional] -**app_id** | **str** | 所属应用的唯一标识符 | [optional] -**cluster_name** | **str** | 所属集群的名称 | [optional] -**namespace_name** | **str** | 所属命名空间的名称 | [optional] -**name** | **str** | 发布名称,用于标识这次发布的版本或描述 | [optional] -**configurations** | [**MapString**](MapString.md) | | [optional] -**comment** | **str** | 发布备注,描述本次发布的变更内容和目的 | [optional] - -## Example - -```python -from apollo_openapi.models.open_release_dto import OpenReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenReleaseDTO from a JSON string -open_release_dto_instance = OpenReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(OpenReleaseDTO.to_json()) - -# convert the object into a dict -open_release_dto_dict = open_release_dto_instance.to_dict() -# create an instance of OpenReleaseDTO from a dict -open_release_dto_from_dict = OpenReleaseDTO.from_dict(open_release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1AppsGet401Response.md b/python/docs/OpenapiV1AppsGet401Response.md deleted file mode 100644 index 2be5321..0000000 --- a/python/docs/OpenapiV1AppsGet401Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenapiV1AppsGet401Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1AppsGet401Response from a JSON string -openapi_v1_apps_get401_response_instance = OpenapiV1AppsGet401Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1AppsGet401Response.to_json()) - -# convert the object into a dict -openapi_v1_apps_get401_response_dict = openapi_v1_apps_get401_response_instance.to_dict() -# create an instance of OpenapiV1AppsGet401Response from a dict -openapi_v1_apps_get401_response_from_dict = OpenapiV1AppsGet401Response.from_dict(openapi_v1_apps_get401_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1AppsPost400Response.md b/python/docs/OpenapiV1AppsPost400Response.md deleted file mode 100644 index 5f7d27c..0000000 --- a/python/docs/OpenapiV1AppsPost400Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenapiV1AppsPost400Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **str** | | [optional] -**exception** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1AppsPost400Response from a JSON string -openapi_v1_apps_post400_response_instance = OpenapiV1AppsPost400Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1AppsPost400Response.to_json()) - -# convert the object into a dict -openapi_v1_apps_post400_response_dict = openapi_v1_apps_post400_response_instance.to_dict() -# create an instance of OpenapiV1AppsPost400Response from a dict -openapi_v1_apps_post400_response_from_dict = OpenapiV1AppsPost400Response.from_dict(openapi_v1_apps_post400_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1AppsPostRequest.md b/python/docs/OpenapiV1AppsPostRequest.md deleted file mode 100644 index 149a5f1..0000000 --- a/python/docs/OpenapiV1AppsPostRequest.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenapiV1AppsPostRequest - - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | [**OpenAppDTO**](OpenAppDTO.md) | | -**assign_app_role_to_self** | **bool** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | -**admins** | **List[str]** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | - -## Example - -```python -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1AppsPostRequest from a JSON string -openapi_v1_apps_post_request_instance = OpenapiV1AppsPostRequest.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1AppsPostRequest.to_json()) - -# convert the object into a dict -openapi_v1_apps_post_request_dict = openapi_v1_apps_post_request_instance.to_dict() -# create an instance of OpenapiV1AppsPostRequest from a dict -openapi_v1_apps_post_request_from_dict = OpenapiV1AppsPostRequest.from_dict(openapi_v1_apps_post_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md b/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md deleted file mode 100644 index 46c211e..0000000 --- a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | **bool** | | [optional] -**message** | **str** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a JSON string -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_instance = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.to_json()) - -# convert the object into a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_dict = openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_instance.to_dict() -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response from a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_from_dict = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.from_dict(openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md b/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md deleted file mode 100644 index d3de248..0000000 --- a/python/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md +++ /dev/null @@ -1,31 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | **bool** | | [optional] -**message** | **str** | | [optional] -**errors** | **List[str]** | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a JSON string -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_instance = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.to_json()) - -# convert the object into a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_dict = openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_instance.to_dict() -# create an instance of OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response from a dict -openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_from_dict = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.from_dict(openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md b/python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md deleted file mode 100644 index 711b774..0000000 --- a/python/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# OpenapiV1EnvsEnvReleasesCompareGet200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**changes** | [**List[Change]**](Change.md) | | [optional] - -## Example - -```python -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a JSON string -openapi_v1_envs_env_releases_compare_get200_response_instance = OpenapiV1EnvsEnvReleasesCompareGet200Response.from_json(json) -# print the JSON string representation of the object -print(OpenapiV1EnvsEnvReleasesCompareGet200Response.to_json()) - -# convert the object into a dict -openapi_v1_envs_env_releases_compare_get200_response_dict = openapi_v1_envs_env_releases_compare_get200_response_instance.to_dict() -# create an instance of OpenapiV1EnvsEnvReleasesCompareGet200Response from a dict -openapi_v1_envs_env_releases_compare_get200_response_from_dict = OpenapiV1EnvsEnvReleasesCompareGet200Response.from_dict(openapi_v1_envs_env_releases_compare_get200_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/OrganizationManagementApi.md b/python/docs/OrganizationManagementApi.md deleted file mode 100644 index 4e82738..0000000 --- a/python/docs/OrganizationManagementApi.md +++ /dev/null @@ -1,85 +0,0 @@ -# apollo_openapi.OrganizationManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_organizations_get**](OrganizationManagementApi.md#openapi_v1_organizations_get) | **GET** /openapi/v1/organizations | 获取所有组织信息 - - -# **openapi_v1_organizations_get** -> List[OpenOrganizationDto] openapi_v1_organizations_get() - -获取所有组织信息 - -GET /openapi/v1/organizations - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.OrganizationManagementApi(api_client) - - try: - # 获取所有组织信息 - api_response = api_instance.openapi_v1_organizations_get() - print("The response of OrganizationManagementApi->openapi_v1_organizations_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling OrganizationManagementApi->openapi_v1_organizations_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[OpenOrganizationDto]**](OpenOrganizationDto.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取组织列表 | - | -**401** | 未授权访问 | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/docs/ReleaseDTO.md b/python/docs/ReleaseDTO.md deleted file mode 100644 index 1d49123..0000000 --- a/python/docs/ReleaseDTO.md +++ /dev/null @@ -1,43 +0,0 @@ -# ReleaseDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | **str** | | [optional] -**data_change_last_modified_by** | **str** | | [optional] -**data_change_created_by_display_name** | **str** | | [optional] -**data_change_last_modified_by_display_name** | **str** | | [optional] -**data_change_created_time** | **str** | | [optional] -**data_change_last_modified_time** | **str** | | [optional] -**id** | **int** | | [optional] -**release_key** | **str** | | [optional] -**name** | **str** | | [optional] -**app_id** | **str** | | [optional] -**cluster_name** | **str** | | [optional] -**namespace_name** | **str** | | [optional] -**configurations** | **str** | | [optional] -**comment** | **str** | | [optional] -**is_abandoned** | **bool** | | [optional] - -## Example - -```python -from apollo_openapi.models.release_dto import ReleaseDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of ReleaseDTO from a JSON string -release_dto_instance = ReleaseDTO.from_json(json) -# print the JSON string representation of the object -print(ReleaseDTO.to_json()) - -# convert the object into a dict -release_dto_dict = release_dto_instance.to_dict() -# create an instance of ReleaseDTO from a dict -release_dto_from_dict = ReleaseDTO.from_dict(release_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python/docs/ReleaseManagementApi.md b/python/docs/ReleaseManagementApi.md deleted file mode 100644 index 55dc1b6..0000000 --- a/python/docs/ReleaseManagementApi.md +++ /dev/null @@ -1,615 +0,0 @@ -# apollo_openapi.ReleaseManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get) | **GET** /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_releases_all_get**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 -[**openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post**](ReleaseManagementApi.md#openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases | 创建发布 -[**openapi_v1_envs_env_releases_compare_get**](ReleaseManagementApi.md#openapi_v1_envs_env_releases_compare_get) | **GET** /openapi/v1/envs/{env}/releases/compare | 对比发布 -[**openapi_v1_envs_env_releases_release_id_get**](ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_get) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 -[**openapi_v1_envs_env_releases_release_id_rollback_put**](ReleaseManagementApi.md#openapi_v1_envs_env_releases_release_id_rollback_put) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 - - -# **openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get** -> List[OpenReleaseDTO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get(app_id, env, cluster_name, namespace_name, page, size) - -获取活跃发布(分页) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - page = 0 # int | - size = 5 # int | - - try: - # 获取活跃发布(分页) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get(app_id, env, cluster_name, namespace_name, page, size) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**List[OpenReleaseDTO]**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_releases_all_get** -> List[ListReleaseBO] openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get(app_id, env, cluster_name, namespace_name, page, size) - -获取所有发布(分页) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.list_release_bo import ListReleaseBO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - page = 0 # int | - size = 5 # int | - - try: - # 获取所有发布(分页) - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get(app_id, env, cluster_name, namespace_name, page, size) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **page** | **int**| | - **size** | **int**| | - -### Return type - -[**List[ListReleaseBO]**](ListReleaseBO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_releases_latest_get** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get(app_id, env, cluster_name, namespace_name) - -获取最新活跃发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - - try: - # 获取最新活跃发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get(app_id, env, cluster_name, namespace_name) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 成功获取最新活跃发布 | - | -**404** | 未找到活跃发布 | - | - -[[Back to top]](#) [[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_releases_post** -> OpenReleaseDTO openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post(app_id, env, cluster_name, namespace_name, namespace_release_dto) - -创建发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - app_id = 'app_id_example' # str | - env = 'env_example' # str | - cluster_name = 'cluster_name_example' # str | - namespace_name = 'namespace_name_example' # str | - namespace_release_dto = apollo_openapi.NamespaceReleaseDTO() # NamespaceReleaseDTO | - - try: - # 创建发布 - api_response = api_instance.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post(app_id, env, cluster_name, namespace_name, namespace_release_dto) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **app_id** | **str**| | - **env** | **str**| | - **cluster_name** | **str**| | - **namespace_name** | **str**| | - **namespace_release_dto** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | 发布创建成功 | - | -**400** | 发布参数错误 | - | -**403** | 权限不足 | - | - -[[Back to top]](#) [[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_compare_get** -> OpenapiV1EnvsEnvReleasesCompareGet200Response openapi_v1_envs_env_releases_compare_get(env, base_release_id, to_compare_release_id) - -对比发布 - -GET /openapi/v1/envs/{env}/releases/compare - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - env = 'env_example' # str | - base_release_id = 56 # int | - to_compare_release_id = 56 # int | - - try: - # 对比发布 - api_response = api_instance.openapi_v1_envs_env_releases_compare_get(env, base_release_id, to_compare_release_id) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_releases_compare_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_releases_compare_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **base_release_id** | **int**| | - **to_compare_release_id** | **int**| | - -### Return type - -[**OpenapiV1EnvsEnvReleasesCompareGet200Response**](OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_get** -> OpenReleaseDTO openapi_v1_envs_env_releases_release_id_get(env, release_id) - -获取发布详情 - -GET /openapi/v1/envs/{env}/releases/{releaseId} - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.models.open_release_dto import OpenReleaseDTO -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - env = 'env_example' # str | - release_id = 56 # int | - - try: - # 获取发布详情 - api_response = api_instance.openapi_v1_envs_env_releases_release_id_get(env, release_id) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **release_id** | **int**| | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[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_rollback_put** -> object openapi_v1_envs_env_releases_release_id_rollback_put(env, release_id, operator) - -回滚发布 - - - -### Example - -* Api Key Authentication (ApiKeyAuth): - -```python -import apollo_openapi -from apollo_openapi.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' - -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = apollo_openapi.ReleaseManagementApi(api_client) - env = 'env_example' # str | - release_id = 56 # int | - operator = 'operator_example' # str | - - try: - # 回滚发布 - api_response = api_instance.openapi_v1_envs_env_releases_release_id_rollback_put(env, release_id, operator) - print("The response of ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_rollback_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ReleaseManagementApi->openapi_v1_envs_env_releases_release_id_rollback_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **env** | **str**| | - **release_id** | **int**| | - **operator** | **str**| | - -### Return type - -**object** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python/git_push.sh b/python/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/python/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/python/pyproject.toml b/python/pyproject.toml deleted file mode 100644 index 524fc38..0000000 --- a/python/pyproject.toml +++ /dev/null @@ -1,95 +0,0 @@ -[project] -name = "apollo_openapi" -version = "0.0.1" -description = "Apollo OpenAPI" -authors = [ - {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, -] -readme = "README.md" -keywords = ["OpenAPI", "OpenAPI-Generator", "Apollo OpenAPI"] -requires-python = ">=3.9" - -dependencies = [ - "urllib3 (>=2.1.0,<3.0.0)", - "python-dateutil (>=2.8.2)", - "pydantic (>=2)", - "typing-extensions (>=4.7.1)", - "lazy-imports (>=1,<2)" -] - -[project.urls] -Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" - -[tool.poetry] -requires-poetry = ">=2.0" - -[tool.poetry.group.dev.dependencies] -pytest = ">= 7.2.1" -pytest-cov = ">= 2.8.1" -tox = ">= 3.9.0" -flake8 = ">= 4.0.0" -types-python-dateutil = ">= 2.8.19.14" -mypy = ">= 1.5" - - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - -[tool.mypy] -files = [ - "apollo_openapi", - #"test", # auto-generated tests - "tests", # hand-written tests -] -# TODO: enable "strict" once all these individual checks are passing -# strict = true - -# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options -warn_unused_configs = true -warn_redundant_casts = true -warn_unused_ignores = true - -## Getting these passing should be easy -strict_equality = true -extra_checks = true - -## Strongly recommend enabling this one as soon as you can -check_untyped_defs = true - -## These shouldn't be too much additional work, but may be tricky to -## get passing if you use a lot of untyped libraries -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true - -### These next few are various gradations of forcing use of type annotations -#disallow_untyped_calls = true -#disallow_incomplete_defs = true -#disallow_untyped_defs = true -# -### This one isn't too hard to get passing, but return on investment is lower -#no_implicit_reexport = true -# -### This one can be tricky to get passing if you use a lot of untyped libraries -#warn_return_any = true - -[[tool.mypy.overrides]] -module = [ - "apollo_openapi.configuration", -] -warn_unused_ignores = true -strict_equality = true -extra_checks = true -check_untyped_defs = true -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true -disallow_untyped_calls = true -disallow_incomplete_defs = true -disallow_untyped_defs = true -no_implicit_reexport = true -warn_return_any = true diff --git a/python/requirements.txt b/python/requirements.txt deleted file mode 100644 index 867a449..0000000 --- a/python/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -urllib3 >= 2.1.0, < 3.0.0 -python_dateutil >= 2.8.2 -pydantic >= 2 -typing-extensions >= 4.7.1 -lazy-imports >= 1, < 2 diff --git a/python/setup.cfg b/python/setup.cfg deleted file mode 100644 index 11433ee..0000000 --- a/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index 41901ea..0000000 --- a/python/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "apollo-openapi" -VERSION = "0.0.1" -PYTHON_REQUIRES = ">= 3.9" -REQUIRES = [ - "urllib3 >= 2.1.0, < 3.0.0", - "python-dateutil >= 2.8.2", - "pydantic >= 2", - "typing-extensions >= 4.7.1", - "lazy-imports >= 1, < 2", -] - -setup( - name=NAME, - version=VERSION, - description="Apollo OpenAPI", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Apollo OpenAPI"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - """, # noqa: E501 - package_data={"apollo_openapi": ["py.typed"]}, -) \ No newline at end of file diff --git a/python/test-requirements.txt b/python/test-requirements.txt deleted file mode 100644 index e98555c..0000000 --- a/python/test-requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -pytest >= 7.2.1 -pytest-cov >= 2.8.1 -tox >= 3.9.0 -flake8 >= 4.0.0 -types-python-dateutil >= 2.8.19.14 -mypy >= 1.5 diff --git a/python/test/__init__.py b/python/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/python/test/test_app_management_api.py b/python/test/test_app_management_api.py deleted file mode 100644 index 86ab8b3..0000000 --- a/python/test/test_app_management_api.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.app_management_api import AppManagementApi - - -class TestAppManagementApi(unittest.TestCase): - """AppManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = AppManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_apps_app_id_appnamespaces_namespace_name_delete(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_namespace_name_delete - - 删除AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_delete(self) -> None: - """Test case for openapi_v1_apps_app_id_delete - - 删除应用 - """ - pass - - def test_openapi_v1_apps_app_id_env_clusters_get(self) -> None: - """Test case for openapi_v1_apps_app_id_env_clusters_get - - 获取应用的环境集群信息 - """ - pass - - def test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete(self) -> None: - """Test case for openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links_delete - - 删除关联的Namespace - """ - pass - - def test_openapi_v1_apps_app_id_get(self) -> None: - """Test case for openapi_v1_apps_app_id_get - - 获取单个应用信息 - """ - pass - - def test_openapi_v1_apps_app_id_miss_envs_get(self) -> None: - """Test case for openapi_v1_apps_app_id_miss_envs_get - - 查找缺失的环境 - """ - pass - - def test_openapi_v1_apps_app_id_namespaces_releases_status_get(self) -> None: - """Test case for openapi_v1_apps_app_id_namespaces_releases_status_get - - 获取应用下所有Namespace的发布状态 - """ - pass - - def test_openapi_v1_apps_app_id_navtree_get(self) -> None: - """Test case for openapi_v1_apps_app_id_navtree_get - - 获取应用导航树 - """ - pass - - def test_openapi_v1_apps_app_id_put(self) -> None: - """Test case for openapi_v1_apps_app_id_put - - 更新应用 - """ - pass - - def test_openapi_v1_apps_by_self_get(self) -> None: - """Test case for openapi_v1_apps_by_self_get - - 获取当前Consumer的应用列表(分页) - """ - pass - - def test_openapi_v1_apps_envs_env_post(self) -> None: - """Test case for openapi_v1_apps_envs_env_post - - 在指定环境创建应用 - """ - pass - - def test_openapi_v1_apps_get(self) -> None: - """Test case for openapi_v1_apps_get - - 获取当前Consumer授权的应用列表 - """ - pass - - def test_openapi_v1_apps_post(self) -> None: - """Test case for openapi_v1_apps_post - - 创建应用 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_change.py b/python/test/test_change.py deleted file mode 100644 index 6efe5d3..0000000 --- a/python/test/test_change.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.change import Change - -class TestChange(unittest.TestCase): - """Change unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Change: - """Test Change - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Change` - """ - model = Change() - if include_optional: - return Change( - type = 'ADDED', - entity = apollo_openapi.models.entity_pair_kv_entity.EntityPairKVEntity( - first_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), - second_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), ) - ) - else: - return Change( - ) - """ - - def testChange(self): - """Test Change""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_cluster_dto.py b/python/test/test_cluster_dto.py deleted file mode 100644 index 63395c9..0000000 --- a/python/test/test_cluster_dto.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.cluster_dto import ClusterDTO - -class TestClusterDTO(unittest.TestCase): - """ClusterDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClusterDTO: - """Test ClusterDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClusterDTO` - """ - model = ClusterDTO() - if include_optional: - return ClusterDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - name = 'zbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5aw', - app_id = '', - parent_cluster_id = 56, - comment = '' - ) - else: - return ClusterDTO( - name = 'zbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5aw', - app_id = '', - ) - """ - - def testClusterDTO(self): - """Test ClusterDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_cluster_management_api.py b/python/test/test_cluster_management_api.py deleted file mode 100644 index 7fcff3e..0000000 --- a/python/test/test_cluster_management_api.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.cluster_management_api import ClusterManagementApi - - -class TestClusterManagementApi(unittest.TestCase): - """ClusterManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = ClusterManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_apps_app_id_clusters_cluster_name_get(self) -> None: - """Test case for openapi_v1_apps_app_id_clusters_cluster_name_get - - 获取指定集群信息 - """ - pass - - def test_openapi_v1_apps_app_id_clusters_post(self) -> None: - """Test case for openapi_v1_apps_app_id_clusters_post - - 创建集群 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_delete - - 删除集群 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_get - - 获取命名空间分支信息 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_get - - 获取指定的Namespace - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_entity_pair_kv_entity.py b/python/test/test_entity_pair_kv_entity.py deleted file mode 100644 index 8b7d7b5..0000000 --- a/python/test/test_entity_pair_kv_entity.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.entity_pair_kv_entity import EntityPairKVEntity - -class TestEntityPairKVEntity(unittest.TestCase): - """EntityPairKVEntity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EntityPairKVEntity: - """Test EntityPairKVEntity - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EntityPairKVEntity` - """ - model = EntityPairKVEntity() - if include_optional: - return EntityPairKVEntity( - first_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), - second_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ) - ) - else: - return EntityPairKVEntity( - ) - """ - - def testEntityPairKVEntity(self): - """Test EntityPairKVEntity""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_env_cluster_info.py b/python/test/test_env_cluster_info.py deleted file mode 100644 index 5492c12..0000000 --- a/python/test/test_env_cluster_info.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.env_cluster_info import EnvClusterInfo - -class TestEnvClusterInfo(unittest.TestCase): - """EnvClusterInfo unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnvClusterInfo: - """Test EnvClusterInfo - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EnvClusterInfo` - """ - model = EnvClusterInfo() - if include_optional: - return EnvClusterInfo( - env = '', - clusters = [ - apollo_openapi.models.cluster_dto.ClusterDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - name = 'zbUUGjjNSwg0_bs9ZayIMrKdgNvb6gvxmPb9GcsM61ate1RA89q3w1l4eH4XxEz.5aw', - app_id = '', - parent_cluster_id = 56, - comment = '', ) - ] - ) - else: - return EnvClusterInfo( - ) - """ - - def testEnvClusterInfo(self): - """Test EnvClusterInfo""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_instance_management_api.py b/python/test/test_instance_management_api.py deleted file mode 100644 index bc3cec1..0000000 --- a/python/test/test_instance_management_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.instance_management_api import InstanceManagementApi - - -class TestInstanceManagementApi(unittest.TestCase): - """InstanceManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = InstanceManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(self) -> None: - """Test case for openapi_v1_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get - - 获取命名空间下的实例数量 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_get - - 查询不在指定发布版本中的实例 - """ - pass - - def test_openapi_v1_envs_env_releases_release_id_instances_get(self) -> None: - """Test case for openapi_v1_envs_env_releases_release_id_instances_get - - 根据发布版本查询实例(支持分页) - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_item_change_sets.py b/python/test/test_item_change_sets.py deleted file mode 100644 index c2b703b..0000000 --- a/python/test/test_item_change_sets.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.item_change_sets import ItemChangeSets - -class TestItemChangeSets(unittest.TestCase): - """ItemChangeSets unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ItemChangeSets: - """Test ItemChangeSets - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ItemChangeSets` - """ - model = ItemChangeSets() - if include_optional: - return ItemChangeSets( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - create_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - update_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - delete_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ] - ) - else: - return ItemChangeSets( - ) - """ - - def testItemChangeSets(self): - """Test ItemChangeSets""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_item_dto.py b/python/test/test_item_dto.py deleted file mode 100644 index 5ae77ea..0000000 --- a/python/test/test_item_dto.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.item_dto import ItemDTO - -class TestItemDTO(unittest.TestCase): - """ItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ItemDTO: - """Test ItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ItemDTO` - """ - model = ItemDTO() - if include_optional: - return ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56 - ) - else: - return ItemDTO( - ) - """ - - def testItemDTO(self): - """Test ItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_item_management_api.py b/python/test/test_item_management_api.py deleted file mode 100644 index 474e196..0000000 --- a/python/test/test_item_management_api.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.item_management_api import ItemManagementApi - - -class TestItemManagementApi(unittest.TestCase): - """ItemManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = ItemManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_delete - - 通过编码的key删除配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_get - - 通过查询参数获取配置项(支持编码的key) - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key_put - - 通过编码的key更新配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update_put - - 通过文本批量修改配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare_post - - 对比命名空间配置差异 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_get - - 获取命名空间下的配置项列表 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_delete - - 删除配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_get - - 获取单个配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key_put - - 更新配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_post - - 创建新的配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert_post - - 撤销配置项更改 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync_post - - 同步配置项到多个命名空间 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post - - 验证配置文本语法 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_kv_entity.py b/python/test/test_kv_entity.py deleted file mode 100644 index c600021..0000000 --- a/python/test/test_kv_entity.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.kv_entity import KVEntity - -class TestKVEntity(unittest.TestCase): - """KVEntity unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> KVEntity: - """Test KVEntity - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `KVEntity` - """ - model = KVEntity() - if include_optional: - return KVEntity( - key = '', - value = '' - ) - else: - return KVEntity( - ) - """ - - def testKVEntity(self): - """Test KVEntity""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_item_diffs.py b/python/test/test_list_item_diffs.py deleted file mode 100644 index 3dc8b5b..0000000 --- a/python/test/test_list_item_diffs.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.list_item_diffs import ListItemDiffs - -class TestListItemDiffs(unittest.TestCase): - """ListItemDiffs unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListItemDiffs: - """Test ListItemDiffs - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ListItemDiffs` - """ - model = ListItemDiffs() - if include_optional: - return ListItemDiffs( - namespace = apollo_openapi.models.namespace_identifier.NamespaceIdentifier( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '', ), - diffs = apollo_openapi.models.item_change_sets.ItemChangeSets( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - create_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - update_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ], - delete_items = [ - - ], ), - ext_info = '' - ) - else: - return ListItemDiffs( - ) - """ - - def testListItemDiffs(self): - """Test ListItemDiffs""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_list_release_bo.py b/python/test/test_list_release_bo.py deleted file mode 100644 index ec02b1d..0000000 --- a/python/test/test_list_release_bo.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.list_release_bo import ListReleaseBO - -class TestListReleaseBO(unittest.TestCase): - """ListReleaseBO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListReleaseBO: - """Test ListReleaseBO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ListReleaseBO` - """ - model = ListReleaseBO() - if include_optional: - return ListReleaseBO( - base_info = apollo_openapi.models.release_dto.ReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - release_key = '', - name = '', - app_id = '', - cluster_name = '', - namespace_name = '', - configurations = '', - comment = '', - is_abandoned = True, ), - items = [ - apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ) - ] - ) - else: - return ListReleaseBO( - ) - """ - - def testListReleaseBO(self): - """Test ListReleaseBO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_map_string.py b/python/test/test_map_string.py deleted file mode 100644 index a4342e0..0000000 --- a/python/test/test_map_string.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.map_string import MapString - -class TestMapString(unittest.TestCase): - """MapString unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MapString: - """Test MapString - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MapString` - """ - model = MapString() - if include_optional: - return MapString( - key = '' - ) - else: - return MapString( - ) - """ - - def testMapString(self): - """Test MapString""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_branch_management_api.py b/python/test/test_namespace_branch_management_api.py deleted file mode 100644 index 8fa8d36..0000000 --- a/python/test/test_namespace_branch_management_api.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.namespace_branch_management_api import NamespaceBranchManagementApi - - -class TestNamespaceBranchManagementApi(unittest.TestCase): - """NamespaceBranchManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = NamespaceBranchManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branch_post - - 创建命名空间分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_delete - - 删除命名空间分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_del_releases_post - - 创建灰度删除发布 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_get - - 获取分支灰度发布规则 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_gray_rules_put - - 更新分支灰度发布规则 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items_get - - 获取分支下的配置项 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge_post - - 合并分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_patch - - 合并分支到主分支 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases_post - - 创建灰度发布 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_gray_del_release_dto.py b/python/test/test_namespace_gray_del_release_dto.py deleted file mode 100644 index d092e11..0000000 --- a/python/test/test_namespace_gray_del_release_dto.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - -class TestNamespaceGrayDelReleaseDTO(unittest.TestCase): - """NamespaceGrayDelReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceGrayDelReleaseDTO: - """Test NamespaceGrayDelReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceGrayDelReleaseDTO` - """ - model = NamespaceGrayDelReleaseDTO() - if include_optional: - return NamespaceGrayDelReleaseDTO( - release_title = '', - release_comment = '', - released_by = '', - is_emergency_publish = True, - gray_del_keys = [ - '' - ] - ) - else: - return NamespaceGrayDelReleaseDTO( - ) - """ - - def testNamespaceGrayDelReleaseDTO(self): - """Test NamespaceGrayDelReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_identifier.py b/python/test/test_namespace_identifier.py deleted file mode 100644 index 8c0ffd5..0000000 --- a/python/test/test_namespace_identifier.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_identifier import NamespaceIdentifier - -class TestNamespaceIdentifier(unittest.TestCase): - """NamespaceIdentifier unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceIdentifier: - """Test NamespaceIdentifier - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceIdentifier` - """ - model = NamespaceIdentifier() - if include_optional: - return NamespaceIdentifier( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '' - ) - else: - return NamespaceIdentifier( - ) - """ - - def testNamespaceIdentifier(self): - """Test NamespaceIdentifier""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_management_api.py b/python/test/test_namespace_management_api.py deleted file mode 100644 index 3342232..0000000 --- a/python/test/test_namespace_management_api.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.namespace_management_api import NamespaceManagementApi - - -class TestNamespaceManagementApi(unittest.TestCase): - """NamespaceManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = NamespaceManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_appnamespaces_get(self) -> None: - """Test case for openapi_v1_appnamespaces_get - - 获取所有公共AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_appnamespaces_get(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_get - - 获取指定应用的AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_appnamespaces_namespace_name_get(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_namespace_name_get - - 获取指定的AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_appnamespaces_post(self) -> None: - """Test case for openapi_v1_apps_app_id_appnamespaces_post - - 创建AppNamespace - """ - pass - - def test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get(self) -> None: - """Test case for openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check_get - - 检查缺失的Namespace - """ - pass - - def test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get(self) -> None: - """Test case for openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association_get - - 获取关联的公共Namespace - """ - pass - - def test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get(self) -> None: - """Test case for openapi_v1_envs_env_appnamespaces_public_namespace_name_instances_get - - 获取公共AppNamespace的所有实例 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_get - - 获取指定集群下的所有Namespace - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock_get - - 获取Namespace的锁状态 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_release_dto.py b/python/test/test_namespace_release_dto.py deleted file mode 100644 index 9941252..0000000 --- a/python/test/test_namespace_release_dto.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_release_dto import NamespaceReleaseDTO - -class TestNamespaceReleaseDTO(unittest.TestCase): - """NamespaceReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceReleaseDTO: - """Test NamespaceReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceReleaseDTO` - """ - model = NamespaceReleaseDTO() - if include_optional: - return NamespaceReleaseDTO( - release_title = '', - release_comment = '', - released_by = '', - is_emergency_publish = True - ) - else: - return NamespaceReleaseDTO( - ) - """ - - def testNamespaceReleaseDTO(self): - """Test NamespaceReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_sync_model.py b/python/test/test_namespace_sync_model.py deleted file mode 100644 index 06d7200..0000000 --- a/python/test/test_namespace_sync_model.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_sync_model import NamespaceSyncModel - -class TestNamespaceSyncModel(unittest.TestCase): - """NamespaceSyncModel unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceSyncModel: - """Test NamespaceSyncModel - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceSyncModel` - """ - model = NamespaceSyncModel() - if include_optional: - return NamespaceSyncModel( - sync_to_namespaces = [ - apollo_openapi.models.namespace_identifier.NamespaceIdentifier( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '', ) - ], - sync_items = [ - apollo_openapi.models.item_dto.ItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - namespace_id = 56, - key = '', - type = 56, - value = '', - comment = '', - line_num = 56, ) - ] - ) - else: - return NamespaceSyncModel( - ) - """ - - def testNamespaceSyncModel(self): - """Test NamespaceSyncModel""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_namespace_text_model.py b/python/test/test_namespace_text_model.py deleted file mode 100644 index 47507fc..0000000 --- a/python/test/test_namespace_text_model.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.namespace_text_model import NamespaceTextModel - -class TestNamespaceTextModel(unittest.TestCase): - """NamespaceTextModel unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> NamespaceTextModel: - """Test NamespaceTextModel - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `NamespaceTextModel` - """ - model = NamespaceTextModel() - if include_optional: - return NamespaceTextModel( - app_id = '', - env = '', - cluster_name = '', - namespace_name = '', - namespace_id = 56, - format = '', - config_text = '', - operator = '' - ) - else: - return NamespaceTextModel( - ) - """ - - def testNamespaceTextModel(self): - """Test NamespaceTextModel""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_app_dto.py b/python/test/test_open_app_dto.py deleted file mode 100644 index 008c191..0000000 --- a/python/test/test_open_app_dto.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_app_dto import OpenAppDTO - -class TestOpenAppDTO(unittest.TestCase): - """OpenAppDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenAppDTO: - """Test OpenAppDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenAppDTO` - """ - model = OpenAppDTO() - if include_optional: - return OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '' - ) - else: - return OpenAppDTO( - ) - """ - - def testOpenAppDTO(self): - """Test OpenAppDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_app_namespace_dto.py b/python/test/test_open_app_namespace_dto.py deleted file mode 100644 index b7cf848..0000000 --- a/python/test/test_open_app_namespace_dto.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_app_namespace_dto import OpenAppNamespaceDTO - -class TestOpenAppNamespaceDTO(unittest.TestCase): - """OpenAppNamespaceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenAppNamespaceDTO: - """Test OpenAppNamespaceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenAppNamespaceDTO` - """ - model = OpenAppNamespaceDTO() - if include_optional: - return OpenAppNamespaceDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - format = '', - is_public = True, - append_namespace_prefix = True, - comment = '' - ) - else: - return OpenAppNamespaceDTO( - ) - """ - - def testOpenAppNamespaceDTO(self): - """Test OpenAppNamespaceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_cluster_dto.py b/python/test/test_open_cluster_dto.py deleted file mode 100644 index ff4ba36..0000000 --- a/python/test/test_open_cluster_dto.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_cluster_dto import OpenClusterDTO - -class TestOpenClusterDTO(unittest.TestCase): - """OpenClusterDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenClusterDTO: - """Test OpenClusterDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenClusterDTO` - """ - model = OpenClusterDTO() - if include_optional: - return OpenClusterDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '' - ) - else: - return OpenClusterDTO( - ) - """ - - def testOpenClusterDTO(self): - """Test OpenClusterDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_create_app_dto.py b/python/test/test_open_create_app_dto.py deleted file mode 100644 index fc64d96..0000000 --- a/python/test/test_open_create_app_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_create_app_dto import OpenCreateAppDTO - -class TestOpenCreateAppDTO(unittest.TestCase): - """OpenCreateAppDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenCreateAppDTO: - """Test OpenCreateAppDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenCreateAppDTO` - """ - model = OpenCreateAppDTO() - if include_optional: - return OpenCreateAppDTO( - assign_app_role_to_self = True, - admins = [ - '' - ], - app = apollo_openapi.models.open_app_dto.OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '', ) - ) - else: - return OpenCreateAppDTO( - ) - """ - - def testOpenCreateAppDTO(self): - """Test OpenCreateAppDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_env_cluster_dto.py b/python/test/test_open_env_cluster_dto.py deleted file mode 100644 index 5844f37..0000000 --- a/python/test/test_open_env_cluster_dto.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_env_cluster_dto import OpenEnvClusterDTO - -class TestOpenEnvClusterDTO(unittest.TestCase): - """OpenEnvClusterDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenEnvClusterDTO: - """Test OpenEnvClusterDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenEnvClusterDTO` - """ - model = OpenEnvClusterDTO() - if include_optional: - return OpenEnvClusterDTO( - env = '', - clusters = [ - '' - ] - ) - else: - return OpenEnvClusterDTO( - ) - """ - - def testOpenEnvClusterDTO(self): - """Test OpenEnvClusterDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_gray_release_rule_dto.py b/python/test/test_open_gray_release_rule_dto.py deleted file mode 100644 index 2be7d2a..0000000 --- a/python/test/test_open_gray_release_rule_dto.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO - -class TestOpenGrayReleaseRuleDTO(unittest.TestCase): - """OpenGrayReleaseRuleDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenGrayReleaseRuleDTO: - """Test OpenGrayReleaseRuleDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenGrayReleaseRuleDTO` - """ - model = OpenGrayReleaseRuleDTO() - if include_optional: - return OpenGrayReleaseRuleDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - app_id = '', - cluster_name = '', - namespace_name = '', - branch_name = '', - rule_items = [ - apollo_openapi.models.open_gray_release_rule_item_dto.OpenGrayReleaseRuleItemDTO( - client_app_id = '', - client_ip_list = [ - '' - ], - client_label_list = [ - '' - ], ) - ] - ) - else: - return OpenGrayReleaseRuleDTO( - ) - """ - - def testOpenGrayReleaseRuleDTO(self): - """Test OpenGrayReleaseRuleDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_gray_release_rule_item_dto.py b/python/test/test_open_gray_release_rule_item_dto.py deleted file mode 100644 index 9da9a5d..0000000 --- a/python/test/test_open_gray_release_rule_item_dto.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO - -class TestOpenGrayReleaseRuleItemDTO(unittest.TestCase): - """OpenGrayReleaseRuleItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenGrayReleaseRuleItemDTO: - """Test OpenGrayReleaseRuleItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenGrayReleaseRuleItemDTO` - """ - model = OpenGrayReleaseRuleItemDTO() - if include_optional: - return OpenGrayReleaseRuleItemDTO( - client_app_id = '', - client_ip_list = [ - '' - ], - client_label_list = [ - '' - ] - ) - else: - return OpenGrayReleaseRuleItemDTO( - ) - """ - - def testOpenGrayReleaseRuleItemDTO(self): - """Test OpenGrayReleaseRuleItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_instance_config_dto.py b/python/test/test_open_instance_config_dto.py deleted file mode 100644 index d9ec1de..0000000 --- a/python/test/test_open_instance_config_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_instance_config_dto import OpenInstanceConfigDTO - -class TestOpenInstanceConfigDTO(unittest.TestCase): - """OpenInstanceConfigDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenInstanceConfigDTO: - """Test OpenInstanceConfigDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenInstanceConfigDTO` - """ - model = OpenInstanceConfigDTO() - if include_optional: - return OpenInstanceConfigDTO( - release = apollo_openapi.models.open_release_dto.OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '', ), - release_delivery_time = '', - data_change_last_modified_time = '' - ) - else: - return OpenInstanceConfigDTO( - ) - """ - - def testOpenInstanceConfigDTO(self): - """Test OpenInstanceConfigDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_instance_dto.py b/python/test/test_open_instance_dto.py deleted file mode 100644 index 02ef253..0000000 --- a/python/test/test_open_instance_dto.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_instance_dto import OpenInstanceDTO - -class TestOpenInstanceDTO(unittest.TestCase): - """OpenInstanceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenInstanceDTO: - """Test OpenInstanceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenInstanceDTO` - """ - model = OpenInstanceDTO() - if include_optional: - return OpenInstanceDTO( - id = 56, - app_id = '', - cluster_name = '', - data_center = '', - ip = '', - configs = [ - apollo_openapi.models.open_instance_config_dto.OpenInstanceConfigDTO( - release = apollo_openapi.models.open_release_dto.OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '', ), - release_delivery_time = '', - data_change_last_modified_time = '', ) - ], - data_change_created_time = '' - ) - else: - return OpenInstanceDTO( - ) - """ - - def testOpenInstanceDTO(self): - """Test OpenInstanceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_item_dto.py b/python/test/test_open_item_dto.py deleted file mode 100644 index da7889e..0000000 --- a/python/test/test_open_item_dto.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_item_dto import OpenItemDTO - -class TestOpenItemDTO(unittest.TestCase): - """OpenItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenItemDTO: - """Test OpenItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenItemDTO` - """ - model = OpenItemDTO() - if include_optional: - return OpenItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - key = '', - type = 56, - value = '', - comment = '' - ) - else: - return OpenItemDTO( - ) - """ - - def testOpenItemDTO(self): - """Test OpenItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_namespace_dto.py b/python/test/test_open_namespace_dto.py deleted file mode 100644 index 66a6d86..0000000 --- a/python/test/test_open_namespace_dto.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_namespace_dto import OpenNamespaceDTO - -class TestOpenNamespaceDTO(unittest.TestCase): - """OpenNamespaceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenNamespaceDTO: - """Test OpenNamespaceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenNamespaceDTO` - """ - model = OpenNamespaceDTO() - if include_optional: - return OpenNamespaceDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - app_id = '', - cluster_name = '', - namespace_name = '', - comment = '', - format = '', - is_public = True, - items = [ - apollo_openapi.models.open_item_dto.OpenItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - key = '', - type = 56, - value = '', - comment = '', ) - ] - ) - else: - return OpenNamespaceDTO( - ) - """ - - def testOpenNamespaceDTO(self): - """Test OpenNamespaceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_namespace_lock_dto.py b/python/test/test_open_namespace_lock_dto.py deleted file mode 100644 index efcaca3..0000000 --- a/python/test/test_open_namespace_lock_dto.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_namespace_lock_dto import OpenNamespaceLockDTO - -class TestOpenNamespaceLockDTO(unittest.TestCase): - """OpenNamespaceLockDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenNamespaceLockDTO: - """Test OpenNamespaceLockDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenNamespaceLockDTO` - """ - model = OpenNamespaceLockDTO() - if include_optional: - return OpenNamespaceLockDTO( - namespace_name = '', - is_locked = True, - locked_by = '' - ) - else: - return OpenNamespaceLockDTO( - ) - """ - - def testOpenNamespaceLockDTO(self): - """Test OpenNamespaceLockDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_organization_dto.py b/python/test/test_open_organization_dto.py deleted file mode 100644 index ce9b845..0000000 --- a/python/test/test_open_organization_dto.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_organization_dto import OpenOrganizationDto - -class TestOpenOrganizationDto(unittest.TestCase): - """OpenOrganizationDto unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenOrganizationDto: - """Test OpenOrganizationDto - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenOrganizationDto` - """ - model = OpenOrganizationDto() - if include_optional: - return OpenOrganizationDto( - org_id = '', - org_name = '' - ) - else: - return OpenOrganizationDto( - ) - """ - - def testOpenOrganizationDto(self): - """Test OpenOrganizationDto""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_page_dto_open_instance_dto.py b/python/test/test_open_page_dto_open_instance_dto.py deleted file mode 100644 index 91875c7..0000000 --- a/python/test/test_open_page_dto_open_instance_dto.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO - -class TestOpenPageDTOOpenInstanceDTO(unittest.TestCase): - """OpenPageDTOOpenInstanceDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenPageDTOOpenInstanceDTO: - """Test OpenPageDTOOpenInstanceDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenPageDTOOpenInstanceDTO` - """ - model = OpenPageDTOOpenInstanceDTO() - if include_optional: - return OpenPageDTOOpenInstanceDTO( - page = 56, - size = 56, - total = 56, - content = [ - apollo_openapi.models.open_instance_dto.OpenInstanceDTO( - id = 56, - app_id = '', - cluster_name = '', - data_center = '', - ip = '', - configs = [ - apollo_openapi.models.open_instance_config_dto.OpenInstanceConfigDTO( - release = apollo_openapi.models.open_release_dto.OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '', ), - release_delivery_time = '', - data_change_last_modified_time = '', ) - ], - data_change_created_time = '', ) - ] - ) - else: - return OpenPageDTOOpenInstanceDTO( - ) - """ - - def testOpenPageDTOOpenInstanceDTO(self): - """Test OpenPageDTOOpenInstanceDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_page_dto_open_item_dto.py b/python/test/test_open_page_dto_open_item_dto.py deleted file mode 100644 index ffbb3b9..0000000 --- a/python/test/test_open_page_dto_open_item_dto.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO - -class TestOpenPageDTOOpenItemDTO(unittest.TestCase): - """OpenPageDTOOpenItemDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenPageDTOOpenItemDTO: - """Test OpenPageDTOOpenItemDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenPageDTOOpenItemDTO` - """ - model = OpenPageDTOOpenItemDTO() - if include_optional: - return OpenPageDTOOpenItemDTO( - page = 56, - size = 56, - total = 56, - content = [ - apollo_openapi.models.open_item_dto.OpenItemDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - key = '', - type = 56, - value = '', - comment = '', ) - ] - ) - else: - return OpenPageDTOOpenItemDTO( - ) - """ - - def testOpenPageDTOOpenItemDTO(self): - """Test OpenPageDTOOpenItemDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_open_release_dto.py b/python/test/test_open_release_dto.py deleted file mode 100644 index 559c374..0000000 --- a/python/test/test_open_release_dto.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.open_release_dto import OpenReleaseDTO - -class TestOpenReleaseDTO(unittest.TestCase): - """OpenReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenReleaseDTO: - """Test OpenReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenReleaseDTO` - """ - model = OpenReleaseDTO() - if include_optional: - return OpenReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - app_id = '', - cluster_name = '', - namespace_name = '', - name = '', - configurations = apollo_openapi.models.map_string.MapString( - key = '', ), - comment = '' - ) - else: - return OpenReleaseDTO( - ) - """ - - def testOpenReleaseDTO(self): - """Test OpenReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_apps_get401_response.py b/python/test/test_openapi_v1_apps_get401_response.py deleted file mode 100644 index 2c1f427..0000000 --- a/python/test/test_openapi_v1_apps_get401_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_apps_get401_response import OpenapiV1AppsGet401Response - -class TestOpenapiV1AppsGet401Response(unittest.TestCase): - """OpenapiV1AppsGet401Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1AppsGet401Response: - """Test OpenapiV1AppsGet401Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1AppsGet401Response` - """ - model = OpenapiV1AppsGet401Response() - if include_optional: - return OpenapiV1AppsGet401Response( - message = '' - ) - else: - return OpenapiV1AppsGet401Response( - ) - """ - - def testOpenapiV1AppsGet401Response(self): - """Test OpenapiV1AppsGet401Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_apps_post400_response.py b/python/test/test_openapi_v1_apps_post400_response.py deleted file mode 100644 index 2a25363..0000000 --- a/python/test/test_openapi_v1_apps_post400_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_apps_post400_response import OpenapiV1AppsPost400Response - -class TestOpenapiV1AppsPost400Response(unittest.TestCase): - """OpenapiV1AppsPost400Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1AppsPost400Response: - """Test OpenapiV1AppsPost400Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1AppsPost400Response` - """ - model = OpenapiV1AppsPost400Response() - if include_optional: - return OpenapiV1AppsPost400Response( - message = '', - exception = '' - ) - else: - return OpenapiV1AppsPost400Response( - ) - """ - - def testOpenapiV1AppsPost400Response(self): - """Test OpenapiV1AppsPost400Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_apps_post_request.py b/python/test/test_openapi_v1_apps_post_request.py deleted file mode 100644 index 0188bad..0000000 --- a/python/test/test_openapi_v1_apps_post_request.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_apps_post_request import OpenapiV1AppsPostRequest - -class TestOpenapiV1AppsPostRequest(unittest.TestCase): - """OpenapiV1AppsPostRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1AppsPostRequest: - """Test OpenapiV1AppsPostRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1AppsPostRequest` - """ - model = OpenapiV1AppsPostRequest() - if include_optional: - return OpenapiV1AppsPostRequest( - app = apollo_openapi.models.open_app_dto.OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '', ), - assign_app_role_to_self = True, - admins = [ - '' - ] - ) - else: - return OpenapiV1AppsPostRequest( - app = apollo_openapi.models.open_app_dto.OpenAppDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_time = '', - data_change_last_modified_time = '', - name = '', - app_id = '', - org_id = '', - org_name = '', - owner_name = '', - owner_email = '', ), - assign_app_role_to_self = True, - admins = [ - '' - ], - ) - """ - - def testOpenapiV1AppsPostRequest(self): - """Test OpenapiV1AppsPostRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py b/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py deleted file mode 100644 index 66e75ab..0000000 --- a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post200_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(unittest.TestCase): - """OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response: - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response` - """ - model = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response() - if include_optional: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response( - valid = True, - message = '' - ) - else: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response( - ) - """ - - def testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(self): - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py b/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py deleted file mode 100644 index e6f7ef3..0000000 --- a/python/test/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate_post400_response import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(unittest.TestCase): - """OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response: - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response` - """ - model = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response() - if include_optional: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response( - valid = True, - message = '', - errors = [ - '' - ] - ) - else: - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response( - ) - """ - - def testOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(self): - """Test OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py b/python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py deleted file mode 100644 index d1b4b63..0000000 --- a/python/test/test_openapi_v1_envs_env_releases_compare_get200_response.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.openapi_v1_envs_env_releases_compare_get200_response import OpenapiV1EnvsEnvReleasesCompareGet200Response - -class TestOpenapiV1EnvsEnvReleasesCompareGet200Response(unittest.TestCase): - """OpenapiV1EnvsEnvReleasesCompareGet200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OpenapiV1EnvsEnvReleasesCompareGet200Response: - """Test OpenapiV1EnvsEnvReleasesCompareGet200Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OpenapiV1EnvsEnvReleasesCompareGet200Response` - """ - model = OpenapiV1EnvsEnvReleasesCompareGet200Response() - if include_optional: - return OpenapiV1EnvsEnvReleasesCompareGet200Response( - changes = [ - apollo_openapi.models.change.Change( - type = 'ADDED', - entity = apollo_openapi.models.entity_pair_kv_entity.EntityPairKVEntity( - first_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), - second_entity = apollo_openapi.models.kv_entity.KVEntity( - key = '', - value = '', ), ), ) - ] - ) - else: - return OpenapiV1EnvsEnvReleasesCompareGet200Response( - ) - """ - - def testOpenapiV1EnvsEnvReleasesCompareGet200Response(self): - """Test OpenapiV1EnvsEnvReleasesCompareGet200Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_organization_management_api.py b/python/test/test_organization_management_api.py deleted file mode 100644 index 4000efe..0000000 --- a/python/test/test_organization_management_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.organization_management_api import OrganizationManagementApi - - -class TestOrganizationManagementApi(unittest.TestCase): - """OrganizationManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = OrganizationManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_organizations_get(self) -> None: - """Test case for openapi_v1_organizations_get - - 获取所有组织信息 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_release_dto.py b/python/test/test_release_dto.py deleted file mode 100644 index 25eb899..0000000 --- a/python/test/test_release_dto.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.models.release_dto import ReleaseDTO - -class TestReleaseDTO(unittest.TestCase): - """ReleaseDTO unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ReleaseDTO: - """Test ReleaseDTO - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ReleaseDTO` - """ - model = ReleaseDTO() - if include_optional: - return ReleaseDTO( - data_change_created_by = '', - data_change_last_modified_by = '', - data_change_created_by_display_name = '', - data_change_last_modified_by_display_name = '', - data_change_created_time = '', - data_change_last_modified_time = '', - id = 56, - release_key = '', - name = '', - app_id = '', - cluster_name = '', - namespace_name = '', - configurations = '', - comment = '', - is_abandoned = True - ) - else: - return ReleaseDTO( - ) - """ - - def testReleaseDTO(self): - """Test ReleaseDTO""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_release_management_api.py b/python/test/test_release_management_api.py deleted file mode 100644 index 04d3731..0000000 --- a/python/test/test_release_management_api.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - - Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from apollo_openapi.api.release_management_api import ReleaseManagementApi - - -class TestReleaseManagementApi(unittest.TestCase): - """ReleaseManagementApi unit test stubs""" - - def setUp(self) -> None: - self.api = ReleaseManagementApi() - - def tearDown(self) -> None: - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active_get - - 获取活跃发布(分页) - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all_get - - 获取所有发布(分页) - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest_get - - 获取最新活跃发布 - """ - pass - - def test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post(self) -> None: - """Test case for openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_post - - 创建发布 - """ - pass - - def test_openapi_v1_envs_env_releases_compare_get(self) -> None: - """Test case for openapi_v1_envs_env_releases_compare_get - - 对比发布 - """ - pass - - def test_openapi_v1_envs_env_releases_release_id_get(self) -> None: - """Test case for openapi_v1_envs_env_releases_release_id_get - - 获取发布详情 - """ - pass - - def test_openapi_v1_envs_env_releases_release_id_rollback_put(self) -> None: - """Test case for openapi_v1_envs_env_releases_release_id_rollback_put - - 回滚发布 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/python/tox.ini b/python/tox.ini deleted file mode 100644 index 6e500b6..0000000 --- a/python/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=apollo_openapi diff --git a/rust/.gitignore b/rust/.gitignore deleted file mode 100644 index 6aa1064..0000000 --- a/rust/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/rust/.openapi-generator-ignore b/rust/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/rust/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rust/.openapi-generator/FILES b/rust/.openapi-generator/FILES deleted file mode 100644 index 5907ccc..0000000 --- a/rust/.openapi-generator/FILES +++ /dev/null @@ -1,86 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -Cargo.toml -README.md -docs/Change.md -docs/ClusterDto.md -docs/EntityPairKvEntity.md -docs/EnvClusterInfo.md -docs/ItemChangeSets.md -docs/ItemDto.md -docs/KvEntity.md -docs/ListItemDiffs.md -docs/ListReleaseBo.md -docs/MapString.md -docs/NamespaceGrayDelReleaseDto.md -docs/NamespaceIdentifier.md -docs/NamespaceReleaseDto.md -docs/NamespaceSyncModel.md -docs/NamespaceTextModel.md -docs/OpenAppDto.md -docs/OpenAppNamespaceDto.md -docs/OpenClusterDto.md -docs/OpenCreateAppDto.md -docs/OpenEnvClusterDto.md -docs/OpenGrayReleaseRuleDto.md -docs/OpenGrayReleaseRuleItemDto.md -docs/OpenInstanceConfigDto.md -docs/OpenInstanceDto.md -docs/OpenItemDto.md -docs/OpenNamespaceDto.md -docs/OpenNamespaceLockDto.md -docs/OpenOrganizationDto.md -docs/OpenPageDtoOpenInstanceDto.md -docs/OpenPageDtoOpenItemDto.md -docs/OpenReleaseDto.md -docs/OpenapiV1AppsGet401Response.md -docs/OpenapiV1AppsPost400Response.md -docs/OpenapiV1AppsPostRequest.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md -docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md -docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md -docs/ReleaseDto.md -git_push.sh -src/apis/configuration.rs -src/apis/mod.rs -src/lib.rs -src/models/_openapi_v1_apps_get_401_response.rs -src/models/_openapi_v1_apps_post_400_response.rs -src/models/_openapi_v1_apps_post_request.rs -src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs -src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs -src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs -src/models/change.rs -src/models/cluster_dto.rs -src/models/entity_pair_kv_entity.rs -src/models/env_cluster_info.rs -src/models/item_change_sets.rs -src/models/item_dto.rs -src/models/kv_entity.rs -src/models/list_item_diffs.rs -src/models/list_release_bo.rs -src/models/map_string.rs -src/models/mod.rs -src/models/namespace_gray_del_release_dto.rs -src/models/namespace_identifier.rs -src/models/namespace_release_dto.rs -src/models/namespace_sync_model.rs -src/models/namespace_text_model.rs -src/models/open_app_dto.rs -src/models/open_app_namespace_dto.rs -src/models/open_cluster_dto.rs -src/models/open_create_app_dto.rs -src/models/open_env_cluster_dto.rs -src/models/open_gray_release_rule_dto.rs -src/models/open_gray_release_rule_item_dto.rs -src/models/open_instance_config_dto.rs -src/models/open_instance_dto.rs -src/models/open_item_dto.rs -src/models/open_namespace_dto.rs -src/models/open_namespace_lock_dto.rs -src/models/open_organization_dto.rs -src/models/open_page_dto_open_instance_dto.rs -src/models/open_page_dto_open_item_dto.rs -src/models/open_release_dto.rs -src/models/release_dto.rs diff --git a/rust/.openapi-generator/VERSION b/rust/.openapi-generator/VERSION deleted file mode 100644 index 368fd8f..0000000 --- a/rust/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.15.0 diff --git a/rust/.travis.yml b/rust/.travis.yml deleted file mode 100644 index 22761ba..0000000 --- a/rust/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/rust/Cargo.toml b/rust/Cargo.toml deleted file mode 100644 index 9743d4f..0000000 --- a/rust/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "apollo-openapi" -version = "0.0.1" -authors = ["OpenAPI Generator team and contributors"] -description = "Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` " -# Override this license by providing a License Object in the OpenAPI. -license = "Unlicense" -edition = "2021" - -[dependencies] -serde = { version = "^1.0", features = ["derive"] } -serde_json = "^1.0" -serde_repr = "^0.1" -url = "^2.5" -reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } diff --git a/rust/README.md b/rust/README.md deleted file mode 100644 index 471067f..0000000 --- a/rust/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Rust API client for apollo-openapi - -Apollo配置中心OpenAPI接口文档 - -## 认证方式 - -所有API接口都需要通过Authorization header进行身份验证。 - -### 获取Token的方式: - -1. **Portal管理界面获取**: - - 登录Apollo Portal管理界面 - - 进入\"管理员工具\" -> \"开放平台授权管理\" - - 创建第三方应用,获取Token - -2. **Token格式**: - ``` - Authorization: token_value - ``` - -3. **Token权限**: - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - -### 使用示例: -```bash -curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ - -H \"Authorization: your_token_here\" -``` - - - -## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: 0.0.1 -- Generator version: 7.15.0 -- Build package: `org.openapitools.codegen.languages.RustClientCodegen` - -## Installation - -Put the package under your project folder in a directory named `apollo-openapi` and add the following to `Cargo.toml` under `[dependencies]`: - -``` -apollo-openapi = { path = "./apollo-openapi" } -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- - - -## Documentation For Models - - - [Change](docs/Change.md) - - [ClusterDto](docs/ClusterDto.md) - - [EntityPairKvEntity](docs/EntityPairKvEntity.md) - - [EnvClusterInfo](docs/EnvClusterInfo.md) - - [ItemChangeSets](docs/ItemChangeSets.md) - - [ItemDto](docs/ItemDto.md) - - [KvEntity](docs/KvEntity.md) - - [ListItemDiffs](docs/ListItemDiffs.md) - - [ListReleaseBo](docs/ListReleaseBo.md) - - [MapString](docs/MapString.md) - - [NamespaceGrayDelReleaseDto](docs/NamespaceGrayDelReleaseDto.md) - - [NamespaceIdentifier](docs/NamespaceIdentifier.md) - - [NamespaceReleaseDto](docs/NamespaceReleaseDto.md) - - [NamespaceSyncModel](docs/NamespaceSyncModel.md) - - [NamespaceTextModel](docs/NamespaceTextModel.md) - - [OpenAppDto](docs/OpenAppDto.md) - - [OpenAppNamespaceDto](docs/OpenAppNamespaceDto.md) - - [OpenClusterDto](docs/OpenClusterDto.md) - - [OpenCreateAppDto](docs/OpenCreateAppDto.md) - - [OpenEnvClusterDto](docs/OpenEnvClusterDto.md) - - [OpenGrayReleaseRuleDto](docs/OpenGrayReleaseRuleDto.md) - - [OpenGrayReleaseRuleItemDto](docs/OpenGrayReleaseRuleItemDto.md) - - [OpenInstanceConfigDto](docs/OpenInstanceConfigDto.md) - - [OpenInstanceDto](docs/OpenInstanceDto.md) - - [OpenItemDto](docs/OpenItemDto.md) - - [OpenNamespaceDto](docs/OpenNamespaceDto.md) - - [OpenNamespaceLockDto](docs/OpenNamespaceLockDto.md) - - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPageDtoOpenInstanceDto](docs/OpenPageDtoOpenInstanceDto.md) - - [OpenPageDtoOpenItemDto](docs/OpenPageDtoOpenItemDto.md) - - [OpenReleaseDto](docs/OpenReleaseDto.md) - - [OpenapiV1AppsGet401Response](docs/OpenapiV1AppsGet401Response.md) - - [OpenapiV1AppsPost400Response](docs/OpenapiV1AppsPost400Response.md) - - [OpenapiV1AppsPostRequest](docs/OpenapiV1AppsPostRequest.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md) - - [OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response](docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md) - - [OpenapiV1EnvsEnvReleasesCompareGet200Response](docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md) - - [ReleaseDto](docs/ReleaseDto.md) - - -To get access to the crate's generated documentation, use: - -``` -cargo doc --open -``` - -## Author - - diff --git a/rust/docs/Change.md b/rust/docs/Change.md deleted file mode 100644 index 380871c..0000000 --- a/rust/docs/Change.md +++ /dev/null @@ -1,12 +0,0 @@ -# Change - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**r#type** | Option<**String**> | | [optional] -**entity** | Option<[**models::EntityPairKvEntity**](EntityPairKVEntity.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ClusterDto.md b/rust/docs/ClusterDto.md deleted file mode 100644 index 6a04f18..0000000 --- a/rust/docs/ClusterDto.md +++ /dev/null @@ -1,21 +0,0 @@ -# ClusterDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**name** | **String** | | -**app_id** | **String** | | -**parent_cluster_id** | Option<**i64**> | | [optional] -**comment** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/EntityPairKvEntity.md b/rust/docs/EntityPairKvEntity.md deleted file mode 100644 index 6ea662f..0000000 --- a/rust/docs/EntityPairKvEntity.md +++ /dev/null @@ -1,12 +0,0 @@ -# EntityPairKvEntity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**first_entity** | Option<[**models::KvEntity**](KVEntity.md)> | | [optional] -**second_entity** | Option<[**models::KvEntity**](KVEntity.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/EnvClusterInfo.md b/rust/docs/EnvClusterInfo.md deleted file mode 100644 index 1203b08..0000000 --- a/rust/docs/EnvClusterInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# EnvClusterInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env** | Option<**String**> | | [optional] -**clusters** | Option<[**Vec**](ClusterDTO.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ItemChangeSets.md b/rust/docs/ItemChangeSets.md deleted file mode 100644 index db6d141..0000000 --- a/rust/docs/ItemChangeSets.md +++ /dev/null @@ -1,19 +0,0 @@ -# ItemChangeSets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**create_items** | Option<[**Vec**](ItemDTO.md)> | | [optional][default to []] -**update_items** | Option<[**Vec**](ItemDTO.md)> | | [optional][default to []] -**delete_items** | Option<[**Vec**](ItemDTO.md)> | | [optional][default to []] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ItemDto.md b/rust/docs/ItemDto.md deleted file mode 100644 index df54eea..0000000 --- a/rust/docs/ItemDto.md +++ /dev/null @@ -1,23 +0,0 @@ -# ItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**namespace_id** | Option<**i64**> | | [optional] -**key** | Option<**String**> | | [optional] -**r#type** | Option<**i32**> | | [optional] -**value** | Option<**String**> | | [optional] -**comment** | Option<**String**> | | [optional] -**line_num** | Option<**i32**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/KvEntity.md b/rust/docs/KvEntity.md deleted file mode 100644 index 087f88e..0000000 --- a/rust/docs/KvEntity.md +++ /dev/null @@ -1,12 +0,0 @@ -# KvEntity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | Option<**String**> | | [optional] -**value** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ListItemDiffs.md b/rust/docs/ListItemDiffs.md deleted file mode 100644 index 3e318b2..0000000 --- a/rust/docs/ListItemDiffs.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListItemDiffs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | Option<[**models::NamespaceIdentifier**](NamespaceIdentifier.md)> | | [optional] -**diffs** | Option<[**models::ItemChangeSets**](ItemChangeSets.md)> | | [optional] -**ext_info** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ListReleaseBo.md b/rust/docs/ListReleaseBo.md deleted file mode 100644 index ce231a6..0000000 --- a/rust/docs/ListReleaseBo.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListReleaseBo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**base_info** | Option<[**models::ReleaseDto**](ReleaseDTO.md)> | | [optional] -**items** | Option<[**Vec**](KVEntity.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/MapString.md b/rust/docs/MapString.md deleted file mode 100644 index 449bcab..0000000 --- a/rust/docs/MapString.md +++ /dev/null @@ -1,11 +0,0 @@ -# MapString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceGrayDelReleaseDto.md b/rust/docs/NamespaceGrayDelReleaseDto.md deleted file mode 100644 index 079e494..0000000 --- a/rust/docs/NamespaceGrayDelReleaseDto.md +++ /dev/null @@ -1,15 +0,0 @@ -# NamespaceGrayDelReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | Option<**String**> | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] -**release_comment** | Option<**String**> | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] -**released_by** | Option<**String**> | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] -**is_emergency_publish** | Option<**bool**> | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] -**gray_del_keys** | Option<**Vec**> | 需要在灰度发布中删除的配置项键名列表 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceIdentifier.md b/rust/docs/NamespaceIdentifier.md deleted file mode 100644 index 5bf8b4b..0000000 --- a/rust/docs/NamespaceIdentifier.md +++ /dev/null @@ -1,14 +0,0 @@ -# NamespaceIdentifier - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**env** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceReleaseDto.md b/rust/docs/NamespaceReleaseDto.md deleted file mode 100644 index 6a510bc..0000000 --- a/rust/docs/NamespaceReleaseDto.md +++ /dev/null @@ -1,14 +0,0 @@ -# NamespaceReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | Option<**String**> | 发布标题,用于标识这次发布的名称或版本号 | [optional] -**release_comment** | Option<**String**> | 发布备注,详细描述本次发布的变更内容和目的 | [optional] -**released_by** | Option<**String**> | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] -**is_emergency_publish** | Option<**bool**> | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceSyncModel.md b/rust/docs/NamespaceSyncModel.md deleted file mode 100644 index f498b4d..0000000 --- a/rust/docs/NamespaceSyncModel.md +++ /dev/null @@ -1,12 +0,0 @@ -# NamespaceSyncModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**sync_to_namespaces** | Option<[**Vec**](NamespaceIdentifier.md)> | | [optional] -**sync_items** | Option<[**Vec**](ItemDTO.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/NamespaceTextModel.md b/rust/docs/NamespaceTextModel.md deleted file mode 100644 index 2df40c3..0000000 --- a/rust/docs/NamespaceTextModel.md +++ /dev/null @@ -1,18 +0,0 @@ -# NamespaceTextModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**env** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] -**namespace_id** | Option<**i64**> | | [optional] -**format** | Option<**String**> | | [optional] -**config_text** | Option<**String**> | | [optional] -**operator** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenAppDto.md b/rust/docs/OpenAppDto.md deleted file mode 100644 index 399b84c..0000000 --- a/rust/docs/OpenAppDto.md +++ /dev/null @@ -1,20 +0,0 @@ -# OpenAppDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 数据创建者用户名,记录是谁创建了这个应用 | [optional] -**data_change_last_modified_by** | Option<**String**> | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] -**data_change_created_time** | Option<**String**> | 数据创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 数据最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | Option<**String**> | 应用名称,用于显示的友好名称 | [optional] -**app_id** | Option<**String**> | 应用唯一标识符,全局唯一的应用ID | [optional] -**org_id** | Option<**String**> | 组织ID,应用所属组织的唯一标识 | [optional] -**org_name** | Option<**String**> | 组织名称,应用所属组织的显示名称 | [optional] -**owner_name** | Option<**String**> | 应用负责人姓名,应用的主要负责人 | [optional] -**owner_email** | Option<**String**> | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenAppNamespaceDto.md b/rust/docs/OpenAppNamespaceDto.md deleted file mode 100644 index 2face6b..0000000 --- a/rust/docs/OpenAppNamespaceDto.md +++ /dev/null @@ -1,20 +0,0 @@ -# OpenAppNamespaceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] -**data_change_last_modified_by** | Option<**String**> | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**data_change_created_time** | Option<**String**> | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | Option<**String**> | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**format** | Option<**String**> | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | Option<**bool**> | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**append_namespace_prefix** | Option<**bool**> | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional][default to true] -**comment** | Option<**String**> | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenClusterDto.md b/rust/docs/OpenClusterDto.md deleted file mode 100644 index d349960..0000000 --- a/rust/docs/OpenClusterDto.md +++ /dev/null @@ -1,16 +0,0 @@ -# OpenClusterDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 集群创建者用户名,记录是谁创建了这个集群 | [optional] -**data_change_last_modified_by** | Option<**String**> | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] -**data_change_created_time** | Option<**String**> | 集群创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | Option<**String**> | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenCreateAppDto.md b/rust/docs/OpenCreateAppDto.md deleted file mode 100644 index 47fc6b3..0000000 --- a/rust/docs/OpenCreateAppDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenCreateAppDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assign_app_role_to_self** | Option<**bool**> | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] -**admins** | Option<**Vec**> | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] -**app** | Option<[**models::OpenAppDto**](OpenAppDTO.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenEnvClusterDto.md b/rust/docs/OpenEnvClusterDto.md deleted file mode 100644 index f38f0c2..0000000 --- a/rust/docs/OpenEnvClusterDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenEnvClusterDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**env** | Option<**String**> | | [optional] -**clusters** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenGrayReleaseRuleDto.md b/rust/docs/OpenGrayReleaseRuleDto.md deleted file mode 100644 index 8fbf13b..0000000 --- a/rust/docs/OpenGrayReleaseRuleDto.md +++ /dev/null @@ -1,19 +0,0 @@ -# OpenGrayReleaseRuleDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] -**data_change_last_modified_by** | Option<**String**> | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] -**data_change_created_time** | Option<**String**> | 灰度规则创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 灰度规则最后修改时间,ISO 8601格式的时间戳 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**namespace_name** | Option<**String**> | 所属命名空间的名称 | [optional] -**branch_name** | Option<**String**> | 灰度分支名称,标识灰度发布的分支 | [optional] -**rule_items** | Option<[**Vec**](OpenGrayReleaseRuleItemDTO.md)> | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenGrayReleaseRuleItemDto.md b/rust/docs/OpenGrayReleaseRuleItemDto.md deleted file mode 100644 index d0d4011..0000000 --- a/rust/docs/OpenGrayReleaseRuleItemDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenGrayReleaseRuleItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_app_id** | Option<**String**> | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] -**client_ip_list** | Option<**Vec**> | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] -**client_label_list** | Option<**Vec**> | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenInstanceConfigDto.md b/rust/docs/OpenInstanceConfigDto.md deleted file mode 100644 index c47e943..0000000 --- a/rust/docs/OpenInstanceConfigDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenInstanceConfigDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release** | Option<[**models::OpenReleaseDto**](OpenReleaseDTO.md)> | | [optional] -**release_delivery_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenInstanceDto.md b/rust/docs/OpenInstanceDto.md deleted file mode 100644 index c80879c..0000000 --- a/rust/docs/OpenInstanceDto.md +++ /dev/null @@ -1,17 +0,0 @@ -# OpenInstanceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | Option<**i64**> | | [optional] -**app_id** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**data_center** | Option<**String**> | | [optional] -**ip** | Option<**String**> | | [optional] -**configs** | Option<[**Vec**](OpenInstanceConfigDTO.md)> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenItemDto.md b/rust/docs/OpenItemDto.md deleted file mode 100644 index a9a5cfb..0000000 --- a/rust/docs/OpenItemDto.md +++ /dev/null @@ -1,18 +0,0 @@ -# OpenItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] -**data_change_last_modified_by** | Option<**String**> | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] -**data_change_created_time** | Option<**String**> | 配置项创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] -**key** | Option<**String**> | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] -**r#type** | Option<**i32**> | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] -**value** | Option<**String**> | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] -**comment** | Option<**String**> | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenNamespaceDto.md b/rust/docs/OpenNamespaceDto.md deleted file mode 100644 index 951c499..0000000 --- a/rust/docs/OpenNamespaceDto.md +++ /dev/null @@ -1,21 +0,0 @@ -# OpenNamespaceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] -**data_change_last_modified_by** | Option<**String**> | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**data_change_created_time** | Option<**String**> | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**namespace_name** | Option<**String**> | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] -**comment** | Option<**String**> | 命名空间备注说明,描述命名空间的用途 | [optional] -**format** | Option<**String**> | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | Option<**bool**> | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**items** | Option<[**Vec**](OpenItemDTO.md)> | 命名空间包含的配置项列表 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenNamespaceLockDto.md b/rust/docs/OpenNamespaceLockDto.md deleted file mode 100644 index 5cb2e29..0000000 --- a/rust/docs/OpenNamespaceLockDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenNamespaceLockDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace_name** | Option<**String**> | 命名空间名称 | [optional] -**is_locked** | Option<**bool**> | 是否被锁定 | [optional] -**locked_by** | Option<**String**> | 锁定者用户名 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenOrganizationDto.md b/rust/docs/OpenOrganizationDto.md deleted file mode 100644 index 75b29a7..0000000 --- a/rust/docs/OpenOrganizationDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenOrganizationDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**org_id** | Option<**String**> | | [optional] -**org_name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenPageDtoOpenInstanceDto.md b/rust/docs/OpenPageDtoOpenInstanceDto.md deleted file mode 100644 index e534b02..0000000 --- a/rust/docs/OpenPageDtoOpenInstanceDto.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenPageDtoOpenInstanceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | 当前页码,从0开始计数 | [optional] -**size** | Option<**i32**> | 每页显示的记录数量 | [optional] -**total** | Option<**i64**> | 总记录数,符合查询条件的实例总数量 | [optional] -**content** | Option<[**Vec**](OpenInstanceDTO.md)> | 当前页的实例列表,包含具体的实例数据 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenPageDtoOpenItemDto.md b/rust/docs/OpenPageDtoOpenItemDto.md deleted file mode 100644 index a98ae6c..0000000 --- a/rust/docs/OpenPageDtoOpenItemDto.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenPageDtoOpenItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | 当前页码,从0开始计数 | [optional] -**size** | Option<**i32**> | 每页显示的记录数量 | [optional] -**total** | Option<**i64**> | 总记录数,符合查询条件的配置项总数量 | [optional] -**content** | Option<[**Vec**](OpenItemDTO.md)> | 当前页的配置项列表,包含具体的配置项数据 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenReleaseDto.md b/rust/docs/OpenReleaseDto.md deleted file mode 100644 index 765f28a..0000000 --- a/rust/docs/OpenReleaseDto.md +++ /dev/null @@ -1,21 +0,0 @@ -# OpenReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 发布创建者用户名,记录是谁创建了这次发布 | [optional] -**data_change_last_modified_by** | Option<**String**> | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] -**data_change_created_time** | Option<**String**> | 发布创建时间,ISO 8601格式的时间戳 | [optional] -**data_change_last_modified_time** | Option<**String**> | 发布最后修改时间,ISO 8601格式的时间戳 | [optional] -**id** | Option<**i64**> | 发布记录的唯一标识符,系统自动生成 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**namespace_name** | Option<**String**> | 所属命名空间的名称 | [optional] -**name** | Option<**String**> | 发布名称,用于标识这次发布的版本或描述 | [optional] -**configurations** | Option<[**models::MapString**](MapString.md)> | | [optional] -**comment** | Option<**String**> | 发布备注,描述本次发布的变更内容和目的 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1AppsGet401Response.md b/rust/docs/OpenapiV1AppsGet401Response.md deleted file mode 100644 index 868b6e6..0000000 --- a/rust/docs/OpenapiV1AppsGet401Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenapiV1AppsGet401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1AppsPost400Response.md b/rust/docs/OpenapiV1AppsPost400Response.md deleted file mode 100644 index 79724c7..0000000 --- a/rust/docs/OpenapiV1AppsPost400Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenapiV1AppsPost400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | Option<**String**> | | [optional] -**exception** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1AppsPostRequest.md b/rust/docs/OpenapiV1AppsPostRequest.md deleted file mode 100644 index c3347cf..0000000 --- a/rust/docs/OpenapiV1AppsPostRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenapiV1AppsPostRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app** | [**models::OpenAppDto**](OpenAppDTO.md) | | -**assign_app_role_to_self** | **bool** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | -**admins** | **Vec** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md b/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md deleted file mode 100644 index f1d33df..0000000 --- a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | Option<**bool**> | | [optional] -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md b/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md deleted file mode 100644 index 019e0e4..0000000 --- a/rust/docs/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**valid** | Option<**bool**> | | [optional] -**message** | Option<**String**> | | [optional] -**errors** | Option<**Vec**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md b/rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md deleted file mode 100644 index 11155f8..0000000 --- a/rust/docs/OpenapiV1EnvsEnvReleasesCompareGet200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenapiV1EnvsEnvReleasesCompareGet200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**changes** | Option<[**Vec**](Change.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/docs/ReleaseDto.md b/rust/docs/ReleaseDto.md deleted file mode 100644 index b0f4617..0000000 --- a/rust/docs/ReleaseDto.md +++ /dev/null @@ -1,25 +0,0 @@ -# ReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | | [optional] -**data_change_last_modified_by** | Option<**String**> | | [optional] -**data_change_created_by_display_name** | Option<**String**> | | [optional] -**data_change_last_modified_by_display_name** | Option<**String**> | | [optional] -**data_change_created_time** | Option<**String**> | | [optional] -**data_change_last_modified_time** | Option<**String**> | | [optional] -**id** | Option<**i64**> | | [optional] -**release_key** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**app_id** | Option<**String**> | | [optional] -**cluster_name** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] -**configurations** | Option<**String**> | | [optional] -**comment** | Option<**String**> | | [optional] -**is_abandoned** | Option<**bool**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rust/git_push.sh b/rust/git_push.sh deleted file mode 100644 index f53a75d..0000000 --- a/rust/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/rust/src/apis/configuration.rs b/rust/src/apis/configuration.rs deleted file mode 100644 index f7fa9f3..0000000 --- a/rust/src/apis/configuration.rs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - - -#[derive(Debug, Clone)] -pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, -} - -pub type BasicAuth = (String, Option); - -#[derive(Debug, Clone)] -pub struct ApiKey { - pub prefix: Option, - pub key: String, -} - - -impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } -} - -impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "http://localhost".to_owned(), - user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - } - } -} diff --git a/rust/src/apis/mod.rs b/rust/src/apis/mod.rs deleted file mode 100644 index 5fb39b8..0000000 --- a/rust/src/apis/mod.rs +++ /dev/null @@ -1,115 +0,0 @@ -use std::error; -use std::fmt; - -#[derive(Debug, Clone)] -pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, -} - -#[derive(Debug)] -pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } -} - -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - Some(match self { - Error::Reqwest(e) => e, - Error::Serde(e) => e, - Error::Io(e) => e, - Error::ResponseError(_) => return None, - }) - } -} - -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } -} - -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } -} - -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } -} - -pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() -} - -pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; - - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object( - &format!("{}[{}]", prefix, key), - value, - )), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object( - &format!("{}[{}][{}]", prefix, key, i), - value, - )); - } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } - - return params; - } - - unimplemented!("Only objects are supported with style=deepObject") -} - -/// Internal use only -/// A content type supported by this client. -#[allow(dead_code)] -enum ContentType { - Json, - Text, - Unsupported(String) -} - -impl From<&str> for ContentType { - fn from(content_type: &str) -> Self { - if content_type.starts_with("application") && content_type.contains("json") { - return Self::Json; - } else if content_type.starts_with("text/plain") { - return Self::Text; - } else { - return Self::Unsupported(content_type.to_string()); - } - } -} - - -pub mod configuration; diff --git a/rust/src/lib.rs b/rust/src/lib.rs deleted file mode 100644 index e152062..0000000 --- a/rust/src/lib.rs +++ /dev/null @@ -1,11 +0,0 @@ -#![allow(unused_imports)] -#![allow(clippy::too_many_arguments)] - -extern crate serde_repr; -extern crate serde; -extern crate serde_json; -extern crate url; -extern crate reqwest; - -pub mod apis; -pub mod models; diff --git a/rust/src/models/_openapi_v1_apps_get_401_response.rs b/rust/src/models/_openapi_v1_apps_get_401_response.rs deleted file mode 100644 index 6a74617..0000000 --- a/rust/src/models/_openapi_v1_apps_get_401_response.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1AppsGet401Response { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl OpenapiV1AppsGet401Response { - pub fn new() -> OpenapiV1AppsGet401Response { - OpenapiV1AppsGet401Response { - message: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_apps_post_400_response.rs b/rust/src/models/_openapi_v1_apps_post_400_response.rs deleted file mode 100644 index 009db69..0000000 --- a/rust/src/models/_openapi_v1_apps_post_400_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1AppsPost400Response { - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "exception", skip_serializing_if = "Option::is_none")] - pub exception: Option, -} - -impl OpenapiV1AppsPost400Response { - pub fn new() -> OpenapiV1AppsPost400Response { - OpenapiV1AppsPost400Response { - message: None, - exception: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_apps_post_request.rs b/rust/src/models/_openapi_v1_apps_post_request.rs deleted file mode 100644 index a629eb8..0000000 --- a/rust/src/models/_openapi_v1_apps_post_request.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenapiV1AppsPostRequest : -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1AppsPostRequest { - #[serde(rename = "app")] - pub app: Box, - /// 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - #[serde(rename = "assignAppRoleToSelf")] - pub assign_app_role_to_self: bool, - /// 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - #[serde(rename = "admins")] - pub admins: Vec, -} - -impl OpenapiV1AppsPostRequest { - /// - pub fn new(app: models::OpenAppDto, assign_app_role_to_self: bool, admins: Vec) -> OpenapiV1AppsPostRequest { - OpenapiV1AppsPostRequest { - app: Box::new(app), - assign_app_role_to_self, - admins, - } - } -} - diff --git a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs b/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs deleted file mode 100644 index 1885655..0000000 --- a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] - pub valid: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - pub fn new() -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - valid: None, - message: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs b/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs deleted file mode 100644 index c603294..0000000 --- a/rust/src/models/_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - #[serde(rename = "valid", skip_serializing_if = "Option::is_none")] - pub valid: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "errors", skip_serializing_if = "Option::is_none")] - pub errors: Option>, -} - -impl OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - pub fn new() -> OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - valid: None, - message: None, - errors: None, - } - } -} - diff --git a/rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs b/rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs deleted file mode 100644 index 696f066..0000000 --- a/rust/src/models/_openapi_v1_envs__env__releases_compare_get_200_response.rs +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenapiV1EnvsEnvReleasesCompareGet200Response { - #[serde(rename = "changes", skip_serializing_if = "Option::is_none")] - pub changes: Option>, -} - -impl OpenapiV1EnvsEnvReleasesCompareGet200Response { - pub fn new() -> OpenapiV1EnvsEnvReleasesCompareGet200Response { - OpenapiV1EnvsEnvReleasesCompareGet200Response { - changes: None, - } - } -} - diff --git a/rust/src/models/change.rs b/rust/src/models/change.rs deleted file mode 100644 index b8f9111..0000000 --- a/rust/src/models/change.rs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct Change { - /// - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - #[serde(rename = "entity", skip_serializing_if = "Option::is_none")] - pub entity: Option>, -} - -impl Change { - pub fn new() -> Change { - Change { - r#type: None, - entity: None, - } - } -} -/// -#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "ADDED")] - Added, - #[serde(rename = "MODIFIED")] - Modified, - #[serde(rename = "DELETED")] - Deleted, -} - -impl Default for Type { - fn default() -> Type { - Self::Added - } -} - diff --git a/rust/src/models/cluster_dto.rs b/rust/src/models/cluster_dto.rs deleted file mode 100644 index 863ecbc..0000000 --- a/rust/src/models/cluster_dto.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ClusterDto { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "name")] - pub name: String, - /// - #[serde(rename = "appId")] - pub app_id: String, - /// - #[serde(rename = "parentClusterId", skip_serializing_if = "Option::is_none")] - pub parent_cluster_id: Option, - /// - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl ClusterDto { - pub fn new(name: String, app_id: String) -> ClusterDto { - ClusterDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - name, - app_id, - parent_cluster_id: None, - comment: None, - } - } -} - diff --git a/rust/src/models/entity_pair_kv_entity.rs b/rust/src/models/entity_pair_kv_entity.rs deleted file mode 100644 index a64edfb..0000000 --- a/rust/src/models/entity_pair_kv_entity.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EntityPairKvEntity { - #[serde(rename = "firstEntity", skip_serializing_if = "Option::is_none")] - pub first_entity: Option>, - #[serde(rename = "secondEntity", skip_serializing_if = "Option::is_none")] - pub second_entity: Option>, -} - -impl EntityPairKvEntity { - pub fn new() -> EntityPairKvEntity { - EntityPairKvEntity { - first_entity: None, - second_entity: None, - } - } -} - diff --git a/rust/src/models/env_cluster_info.rs b/rust/src/models/env_cluster_info.rs deleted file mode 100644 index 257c581..0000000 --- a/rust/src/models/env_cluster_info.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct EnvClusterInfo { - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// - #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")] - pub clusters: Option>, -} - -impl EnvClusterInfo { - pub fn new() -> EnvClusterInfo { - EnvClusterInfo { - env: None, - clusters: None, - } - } -} - diff --git a/rust/src/models/item_change_sets.rs b/rust/src/models/item_change_sets.rs deleted file mode 100644 index 57fe322..0000000 --- a/rust/src/models/item_change_sets.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ItemChangeSets { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "createItems", skip_serializing_if = "Option::is_none")] - pub create_items: Option>, - /// - #[serde(rename = "updateItems", skip_serializing_if = "Option::is_none")] - pub update_items: Option>, - /// - #[serde(rename = "deleteItems", skip_serializing_if = "Option::is_none")] - pub delete_items: Option>, -} - -impl ItemChangeSets { - pub fn new() -> ItemChangeSets { - ItemChangeSets { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - create_items: None, - update_items: None, - delete_items: None, - } - } -} - diff --git a/rust/src/models/item_dto.rs b/rust/src/models/item_dto.rs deleted file mode 100644 index 309be2a..0000000 --- a/rust/src/models/item_dto.rs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ItemDto { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "namespaceId", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - /// - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - /// - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, - /// - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// - #[serde(rename = "lineNum", skip_serializing_if = "Option::is_none")] - pub line_num: Option, -} - -impl ItemDto { - pub fn new() -> ItemDto { - ItemDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - namespace_id: None, - key: None, - r#type: None, - value: None, - comment: None, - line_num: None, - } - } -} - diff --git a/rust/src/models/kv_entity.rs b/rust/src/models/kv_entity.rs deleted file mode 100644 index fd3cb3f..0000000 --- a/rust/src/models/kv_entity.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct KvEntity { - /// - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - /// - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, -} - -impl KvEntity { - pub fn new() -> KvEntity { - KvEntity { - key: None, - value: None, - } - } -} - diff --git a/rust/src/models/list_item_diffs.rs b/rust/src/models/list_item_diffs.rs deleted file mode 100644 index ffd7531..0000000 --- a/rust/src/models/list_item_diffs.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListItemDiffs { - #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")] - pub namespace: Option>, - #[serde(rename = "diffs", skip_serializing_if = "Option::is_none")] - pub diffs: Option>, - /// - #[serde(rename = "extInfo", skip_serializing_if = "Option::is_none")] - pub ext_info: Option, -} - -impl ListItemDiffs { - pub fn new() -> ListItemDiffs { - ListItemDiffs { - namespace: None, - diffs: None, - ext_info: None, - } - } -} - diff --git a/rust/src/models/list_release_bo.rs b/rust/src/models/list_release_bo.rs deleted file mode 100644 index 16a3dde..0000000 --- a/rust/src/models/list_release_bo.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListReleaseBo { - #[serde(rename = "baseInfo", skip_serializing_if = "Option::is_none")] - pub base_info: Option>, - /// - #[serde(rename = "items", skip_serializing_if = "Option::is_none")] - pub items: Option>, -} - -impl ListReleaseBo { - pub fn new() -> ListReleaseBo { - ListReleaseBo { - base_info: None, - items: None, - } - } -} - diff --git a/rust/src/models/map_string.rs b/rust/src/models/map_string.rs deleted file mode 100644 index d11ac38..0000000 --- a/rust/src/models/map_string.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// MapString : 字符串映射对象,用于表示键值对的配置数据结构 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct MapString { - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, -} - -impl MapString { - /// 字符串映射对象,用于表示键值对的配置数据结构 - pub fn new() -> MapString { - MapString { - key: None, - } - } -} - diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs deleted file mode 100644 index 9d5f7f6..0000000 --- a/rust/src/models/mod.rs +++ /dev/null @@ -1,76 +0,0 @@ -pub mod change; -pub use self::change::Change; -pub mod cluster_dto; -pub use self::cluster_dto::ClusterDto; -pub mod entity_pair_kv_entity; -pub use self::entity_pair_kv_entity::EntityPairKvEntity; -pub mod env_cluster_info; -pub use self::env_cluster_info::EnvClusterInfo; -pub mod item_change_sets; -pub use self::item_change_sets::ItemChangeSets; -pub mod item_dto; -pub use self::item_dto::ItemDto; -pub mod kv_entity; -pub use self::kv_entity::KvEntity; -pub mod list_item_diffs; -pub use self::list_item_diffs::ListItemDiffs; -pub mod list_release_bo; -pub use self::list_release_bo::ListReleaseBo; -pub mod map_string; -pub use self::map_string::MapString; -pub mod namespace_gray_del_release_dto; -pub use self::namespace_gray_del_release_dto::NamespaceGrayDelReleaseDto; -pub mod namespace_identifier; -pub use self::namespace_identifier::NamespaceIdentifier; -pub mod namespace_release_dto; -pub use self::namespace_release_dto::NamespaceReleaseDto; -pub mod namespace_sync_model; -pub use self::namespace_sync_model::NamespaceSyncModel; -pub mod namespace_text_model; -pub use self::namespace_text_model::NamespaceTextModel; -pub mod open_app_dto; -pub use self::open_app_dto::OpenAppDto; -pub mod open_app_namespace_dto; -pub use self::open_app_namespace_dto::OpenAppNamespaceDto; -pub mod open_cluster_dto; -pub use self::open_cluster_dto::OpenClusterDto; -pub mod open_create_app_dto; -pub use self::open_create_app_dto::OpenCreateAppDto; -pub mod open_env_cluster_dto; -pub use self::open_env_cluster_dto::OpenEnvClusterDto; -pub mod open_gray_release_rule_dto; -pub use self::open_gray_release_rule_dto::OpenGrayReleaseRuleDto; -pub mod open_gray_release_rule_item_dto; -pub use self::open_gray_release_rule_item_dto::OpenGrayReleaseRuleItemDto; -pub mod open_instance_config_dto; -pub use self::open_instance_config_dto::OpenInstanceConfigDto; -pub mod open_instance_dto; -pub use self::open_instance_dto::OpenInstanceDto; -pub mod open_item_dto; -pub use self::open_item_dto::OpenItemDto; -pub mod open_namespace_dto; -pub use self::open_namespace_dto::OpenNamespaceDto; -pub mod open_namespace_lock_dto; -pub use self::open_namespace_lock_dto::OpenNamespaceLockDto; -pub mod open_organization_dto; -pub use self::open_organization_dto::OpenOrganizationDto; -pub mod open_page_dto_open_instance_dto; -pub use self::open_page_dto_open_instance_dto::OpenPageDtoOpenInstanceDto; -pub mod open_page_dto_open_item_dto; -pub use self::open_page_dto_open_item_dto::OpenPageDtoOpenItemDto; -pub mod open_release_dto; -pub use self::open_release_dto::OpenReleaseDto; -pub mod _openapi_v1_apps_get_401_response; -pub use self::_openapi_v1_apps_get_401_response::OpenapiV1AppsGet401Response; -pub mod _openapi_v1_apps_post_400_response; -pub use self::_openapi_v1_apps_post_400_response::OpenapiV1AppsPost400Response; -pub mod _openapi_v1_apps_post_request; -pub use self::_openapi_v1_apps_post_request::OpenapiV1AppsPostRequest; -pub mod _openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response; -pub use self::_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_200_response::OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -pub mod _openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response; -pub use self::_openapi_v1_envs__env__apps__app_id__clusters__cluster_name__namespaces__namespace_name__items_validate_post_400_response::OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; -pub mod _openapi_v1_envs__env__releases_compare_get_200_response; -pub use self::_openapi_v1_envs__env__releases_compare_get_200_response::OpenapiV1EnvsEnvReleasesCompareGet200Response; -pub mod release_dto; -pub use self::release_dto::ReleaseDto; diff --git a/rust/src/models/namespace_gray_del_release_dto.rs b/rust/src/models/namespace_gray_del_release_dto.rs deleted file mode 100644 index 0d77c5e..0000000 --- a/rust/src/models/namespace_gray_del_release_dto.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NamespaceGrayDelReleaseDto : 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceGrayDelReleaseDto { - /// 发布标题,用于标识这次灰度删除发布的名称或版本号 - #[serde(rename = "releaseTitle", skip_serializing_if = "Option::is_none")] - pub release_title: Option, - /// 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - #[serde(rename = "releaseComment", skip_serializing_if = "Option::is_none")] - pub release_comment: Option, - /// 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - #[serde(rename = "releasedBy", skip_serializing_if = "Option::is_none")] - pub released_by: Option, - /// 是否为紧急发布,紧急发布可能会跳过某些审核流程 - #[serde(rename = "isEmergencyPublish", skip_serializing_if = "Option::is_none")] - pub is_emergency_publish: Option, - /// 需要在灰度发布中删除的配置项键名列表 - #[serde(rename = "grayDelKeys", skip_serializing_if = "Option::is_none")] - pub gray_del_keys: Option>, -} - -impl NamespaceGrayDelReleaseDto { - /// 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - pub fn new() -> NamespaceGrayDelReleaseDto { - NamespaceGrayDelReleaseDto { - release_title: None, - release_comment: None, - released_by: None, - is_emergency_publish: None, - gray_del_keys: None, - } - } -} - diff --git a/rust/src/models/namespace_identifier.rs b/rust/src/models/namespace_identifier.rs deleted file mode 100644 index c8b8d08..0000000 --- a/rust/src/models/namespace_identifier.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceIdentifier { - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, -} - -impl NamespaceIdentifier { - pub fn new() -> NamespaceIdentifier { - NamespaceIdentifier { - app_id: None, - env: None, - cluster_name: None, - namespace_name: None, - } - } -} - diff --git a/rust/src/models/namespace_release_dto.rs b/rust/src/models/namespace_release_dto.rs deleted file mode 100644 index bed00a5..0000000 --- a/rust/src/models/namespace_release_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// NamespaceReleaseDto : 命名空间发布请求数据传输对象,用于创建新的配置发布 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceReleaseDto { - /// 发布标题,用于标识这次发布的名称或版本号 - #[serde(rename = "releaseTitle", skip_serializing_if = "Option::is_none")] - pub release_title: Option, - /// 发布备注,详细描述本次发布的变更内容和目的 - #[serde(rename = "releaseComment", skip_serializing_if = "Option::is_none")] - pub release_comment: Option, - /// 发布操作者用户名,记录是谁执行了这次发布操作 - #[serde(rename = "releasedBy", skip_serializing_if = "Option::is_none")] - pub released_by: Option, - /// 是否为紧急发布,紧急发布可能会跳过某些审核流程 - #[serde(rename = "isEmergencyPublish", skip_serializing_if = "Option::is_none")] - pub is_emergency_publish: Option, -} - -impl NamespaceReleaseDto { - /// 命名空间发布请求数据传输对象,用于创建新的配置发布 - pub fn new() -> NamespaceReleaseDto { - NamespaceReleaseDto { - release_title: None, - release_comment: None, - released_by: None, - is_emergency_publish: None, - } - } -} - diff --git a/rust/src/models/namespace_sync_model.rs b/rust/src/models/namespace_sync_model.rs deleted file mode 100644 index 23585bf..0000000 --- a/rust/src/models/namespace_sync_model.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceSyncModel { - /// - #[serde(rename = "syncToNamespaces", skip_serializing_if = "Option::is_none")] - pub sync_to_namespaces: Option>, - /// - #[serde(rename = "syncItems", skip_serializing_if = "Option::is_none")] - pub sync_items: Option>, -} - -impl NamespaceSyncModel { - pub fn new() -> NamespaceSyncModel { - NamespaceSyncModel { - sync_to_namespaces: None, - sync_items: None, - } - } -} - diff --git a/rust/src/models/namespace_text_model.rs b/rust/src/models/namespace_text_model.rs deleted file mode 100644 index 423db9c..0000000 --- a/rust/src/models/namespace_text_model.rs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct NamespaceTextModel { - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// - #[serde(rename = "namespaceId", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// - #[serde(rename = "format", skip_serializing_if = "Option::is_none")] - pub format: Option, - /// - #[serde(rename = "configText", skip_serializing_if = "Option::is_none")] - pub config_text: Option, - /// - #[serde(rename = "operator", skip_serializing_if = "Option::is_none")] - pub operator: Option, -} - -impl NamespaceTextModel { - pub fn new() -> NamespaceTextModel { - NamespaceTextModel { - app_id: None, - env: None, - cluster_name: None, - namespace_name: None, - namespace_id: None, - format: None, - config_text: None, - operator: None, - } - } -} - diff --git a/rust/src/models/open_app_dto.rs b/rust/src/models/open_app_dto.rs deleted file mode 100644 index 6a85608..0000000 --- a/rust/src/models/open_app_dto.rs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenAppDto : Apollo应用信息数据传输对象,包含应用的基本信息和元数据 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenAppDto { - /// 数据创建者用户名,记录是谁创建了这个应用 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 数据最后修改者用户名,记录最后一次修改应用信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 数据创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 数据最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 应用名称,用于显示的友好名称 - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// 应用唯一标识符,全局唯一的应用ID - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 组织ID,应用所属组织的唯一标识 - #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")] - pub org_id: Option, - /// 组织名称,应用所属组织的显示名称 - #[serde(rename = "orgName", skip_serializing_if = "Option::is_none")] - pub org_name: Option, - /// 应用负责人姓名,应用的主要负责人 - #[serde(rename = "ownerName", skip_serializing_if = "Option::is_none")] - pub owner_name: Option, - /// 应用负责人邮箱地址,用于接收应用相关通知 - #[serde(rename = "ownerEmail", skip_serializing_if = "Option::is_none")] - pub owner_email: Option, -} - -impl OpenAppDto { - /// Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - pub fn new() -> OpenAppDto { - OpenAppDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - name: None, - app_id: None, - org_id: None, - org_name: None, - owner_name: None, - owner_email: None, - } - } -} - diff --git a/rust/src/models/open_app_namespace_dto.rs b/rust/src/models/open_app_namespace_dto.rs deleted file mode 100644 index 629a3b3..0000000 --- a/rust/src/models/open_app_namespace_dto.rs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenAppNamespaceDto : Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenAppNamespaceDto { - /// 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 命名空间创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 命名空间最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 命名空间名称,在同一应用内唯一标识一个命名空间 - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 命名空间格式类型,如properties、xml、json、yml等 - #[serde(rename = "format", skip_serializing_if = "Option::is_none")] - pub format: Option, - /// 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - #[serde(rename = "isPublic", skip_serializing_if = "Option::is_none")] - pub is_public: Option, - /// 对于公共命名空间,是否在命名空间名称前添加前缀 - #[serde(rename = "appendNamespacePrefix", skip_serializing_if = "Option::is_none")] - pub append_namespace_prefix: Option, - /// 命名空间备注说明,描述命名空间的用途和包含的配置类型 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl OpenAppNamespaceDto { - /// Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - pub fn new() -> OpenAppNamespaceDto { - OpenAppNamespaceDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - name: None, - app_id: None, - format: None, - is_public: None, - append_namespace_prefix: None, - comment: None, - } - } -} - diff --git a/rust/src/models/open_cluster_dto.rs b/rust/src/models/open_cluster_dto.rs deleted file mode 100644 index 2bfa39f..0000000 --- a/rust/src/models/open_cluster_dto.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenClusterDto : Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenClusterDto { - /// 集群创建者用户名,记录是谁创建了这个集群 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 集群最后修改者用户名,记录最后一次修改集群信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 集群创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 集群最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 集群名称,在同一应用和环境下唯一标识一个集群 - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, -} - -impl OpenClusterDto { - /// Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - pub fn new() -> OpenClusterDto { - OpenClusterDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - name: None, - app_id: None, - } - } -} - diff --git a/rust/src/models/open_create_app_dto.rs b/rust/src/models/open_create_app_dto.rs deleted file mode 100644 index 8e0403c..0000000 --- a/rust/src/models/open_create_app_dto.rs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenCreateAppDto : 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenCreateAppDto { - /// 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - #[serde(rename = "assignAppRoleToSelf", skip_serializing_if = "Option::is_none")] - pub assign_app_role_to_self: Option, - /// 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - #[serde(rename = "admins", skip_serializing_if = "Option::is_none")] - pub admins: Option>, - #[serde(rename = "app", skip_serializing_if = "Option::is_none")] - pub app: Option>, -} - -impl OpenCreateAppDto { - /// 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - pub fn new() -> OpenCreateAppDto { - OpenCreateAppDto { - assign_app_role_to_self: None, - admins: None, - app: None, - } - } -} - diff --git a/rust/src/models/open_env_cluster_dto.rs b/rust/src/models/open_env_cluster_dto.rs deleted file mode 100644 index 432de15..0000000 --- a/rust/src/models/open_env_cluster_dto.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenEnvClusterDto { - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// - #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")] - pub clusters: Option>, -} - -impl OpenEnvClusterDto { - pub fn new() -> OpenEnvClusterDto { - OpenEnvClusterDto { - env: None, - clusters: None, - } - } -} - diff --git a/rust/src/models/open_gray_release_rule_dto.rs b/rust/src/models/open_gray_release_rule_dto.rs deleted file mode 100644 index c4ec5c7..0000000 --- a/rust/src/models/open_gray_release_rule_dto.rs +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenGrayReleaseRuleDto : Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenGrayReleaseRuleDto { - /// 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 灰度规则创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 灰度规则最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 所属命名空间的名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 灰度分支名称,标识灰度发布的分支 - #[serde(rename = "branchName", skip_serializing_if = "Option::is_none")] - pub branch_name: Option, - /// 灰度发布规则项列表,包含具体的灰度规则条件 - #[serde(rename = "ruleItems", skip_serializing_if = "Option::is_none")] - pub rule_items: Option>, -} - -impl OpenGrayReleaseRuleDto { - /// Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - pub fn new() -> OpenGrayReleaseRuleDto { - OpenGrayReleaseRuleDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - app_id: None, - cluster_name: None, - namespace_name: None, - branch_name: None, - rule_items: None, - } - } -} - diff --git a/rust/src/models/open_gray_release_rule_item_dto.rs b/rust/src/models/open_gray_release_rule_item_dto.rs deleted file mode 100644 index 11a823a..0000000 --- a/rust/src/models/open_gray_release_rule_item_dto.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenGrayReleaseRuleItemDto : Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenGrayReleaseRuleItemDto { - /// 客户端应用ID,指定哪个应用可以获取灰度配置 - #[serde(rename = "clientAppId", skip_serializing_if = "Option::is_none")] - pub client_app_id: Option, - /// 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - #[serde(rename = "clientIpList", skip_serializing_if = "Option::is_none")] - pub client_ip_list: Option>, - /// 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - #[serde(rename = "clientLabelList", skip_serializing_if = "Option::is_none")] - pub client_label_list: Option>, -} - -impl OpenGrayReleaseRuleItemDto { - /// Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - pub fn new() -> OpenGrayReleaseRuleItemDto { - OpenGrayReleaseRuleItemDto { - client_app_id: None, - client_ip_list: None, - client_label_list: None, - } - } -} - diff --git a/rust/src/models/open_instance_config_dto.rs b/rust/src/models/open_instance_config_dto.rs deleted file mode 100644 index 4c5f5ee..0000000 --- a/rust/src/models/open_instance_config_dto.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenInstanceConfigDto { - #[serde(rename = "release", skip_serializing_if = "Option::is_none")] - pub release: Option>, - /// - #[serde(rename = "releaseDeliveryTime", skip_serializing_if = "Option::is_none")] - pub release_delivery_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, -} - -impl OpenInstanceConfigDto { - pub fn new() -> OpenInstanceConfigDto { - OpenInstanceConfigDto { - release: None, - release_delivery_time: None, - data_change_last_modified_time: None, - } - } -} - diff --git a/rust/src/models/open_instance_dto.rs b/rust/src/models/open_instance_dto.rs deleted file mode 100644 index 485f1e4..0000000 --- a/rust/src/models/open_instance_dto.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenInstanceDto { - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// - #[serde(rename = "dataCenter", skip_serializing_if = "Option::is_none")] - pub data_center: Option, - /// - #[serde(rename = "ip", skip_serializing_if = "Option::is_none")] - pub ip: Option, - /// - #[serde(rename = "configs", skip_serializing_if = "Option::is_none")] - pub configs: Option>, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, -} - -impl OpenInstanceDto { - pub fn new() -> OpenInstanceDto { - OpenInstanceDto { - id: None, - app_id: None, - cluster_name: None, - data_center: None, - ip: None, - configs: None, - data_change_created_time: None, - } - } -} - diff --git a/rust/src/models/open_item_dto.rs b/rust/src/models/open_item_dto.rs deleted file mode 100644 index f104f24..0000000 --- a/rust/src/models/open_item_dto.rs +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenItemDto : Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenItemDto { - /// 配置项创建者用户名,记录是谁创建了这个配置项 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 配置项最后修改者用户名,记录最后一次修改配置的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 配置项创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 配置项最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 配置项的键名,在同一命名空间内唯一标识一个配置项 - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - /// 配置项类型,0表示普通配置项,1表示文件类型配置项 - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - /// 配置项的值,可以是字符串、数字、JSON等格式 - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, - /// 配置项的注释说明,用于描述配置项的用途和含义 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl OpenItemDto { - /// Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - pub fn new() -> OpenItemDto { - OpenItemDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - key: None, - r#type: None, - value: None, - comment: None, - } - } -} - diff --git a/rust/src/models/open_namespace_dto.rs b/rust/src/models/open_namespace_dto.rs deleted file mode 100644 index 0606b01..0000000 --- a/rust/src/models/open_namespace_dto.rs +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenNamespaceDto : Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenNamespaceDto { - /// 命名空间创建者用户名,记录是谁创建了这个命名空间 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 命名空间创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 命名空间最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 命名空间备注说明,描述命名空间的用途 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// 命名空间格式类型,如properties、xml、json、yml等 - #[serde(rename = "format", skip_serializing_if = "Option::is_none")] - pub format: Option, - /// 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - #[serde(rename = "isPublic", skip_serializing_if = "Option::is_none")] - pub is_public: Option, - /// 命名空间包含的配置项列表 - #[serde(rename = "items", skip_serializing_if = "Option::is_none")] - pub items: Option>, -} - -impl OpenNamespaceDto { - /// Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - pub fn new() -> OpenNamespaceDto { - OpenNamespaceDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - app_id: None, - cluster_name: None, - namespace_name: None, - comment: None, - format: None, - is_public: None, - items: None, - } - } -} - diff --git a/rust/src/models/open_namespace_lock_dto.rs b/rust/src/models/open_namespace_lock_dto.rs deleted file mode 100644 index fb48ebb..0000000 --- a/rust/src/models/open_namespace_lock_dto.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenNamespaceLockDto : Apollo命名空间锁状态数据传输对象 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenNamespaceLockDto { - /// 命名空间名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 是否被锁定 - #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] - pub is_locked: Option, - /// 锁定者用户名 - #[serde(rename = "lockedBy", skip_serializing_if = "Option::is_none")] - pub locked_by: Option, -} - -impl OpenNamespaceLockDto { - /// Apollo命名空间锁状态数据传输对象 - pub fn new() -> OpenNamespaceLockDto { - OpenNamespaceLockDto { - namespace_name: None, - is_locked: None, - locked_by: None, - } - } -} - diff --git a/rust/src/models/open_organization_dto.rs b/rust/src/models/open_organization_dto.rs deleted file mode 100644 index bba5d4d..0000000 --- a/rust/src/models/open_organization_dto.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenOrganizationDto { - /// - #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")] - pub org_id: Option, - /// - #[serde(rename = "orgName", skip_serializing_if = "Option::is_none")] - pub org_name: Option, -} - -impl OpenOrganizationDto { - pub fn new() -> OpenOrganizationDto { - OpenOrganizationDto { - org_id: None, - org_name: None, - } - } -} - diff --git a/rust/src/models/open_page_dto_open_instance_dto.rs b/rust/src/models/open_page_dto_open_instance_dto.rs deleted file mode 100644 index 55a03f4..0000000 --- a/rust/src/models/open_page_dto_open_instance_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenPageDtoOpenInstanceDto : 分页实例数据传输对象,用于返回分页查询的实例列表结果 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenPageDtoOpenInstanceDto { - /// 当前页码,从0开始计数 - #[serde(rename = "page", skip_serializing_if = "Option::is_none")] - pub page: Option, - /// 每页显示的记录数量 - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - /// 总记录数,符合查询条件的实例总数量 - #[serde(rename = "total", skip_serializing_if = "Option::is_none")] - pub total: Option, - /// 当前页的实例列表,包含具体的实例数据 - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, -} - -impl OpenPageDtoOpenInstanceDto { - /// 分页实例数据传输对象,用于返回分页查询的实例列表结果 - pub fn new() -> OpenPageDtoOpenInstanceDto { - OpenPageDtoOpenInstanceDto { - page: None, - size: None, - total: None, - content: None, - } - } -} - diff --git a/rust/src/models/open_page_dto_open_item_dto.rs b/rust/src/models/open_page_dto_open_item_dto.rs deleted file mode 100644 index 75c82c6..0000000 --- a/rust/src/models/open_page_dto_open_item_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenPageDtoOpenItemDto : 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenPageDtoOpenItemDto { - /// 当前页码,从0开始计数 - #[serde(rename = "page", skip_serializing_if = "Option::is_none")] - pub page: Option, - /// 每页显示的记录数量 - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - /// 总记录数,符合查询条件的配置项总数量 - #[serde(rename = "total", skip_serializing_if = "Option::is_none")] - pub total: Option, - /// 当前页的配置项列表,包含具体的配置项数据 - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, -} - -impl OpenPageDtoOpenItemDto { - /// 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - pub fn new() -> OpenPageDtoOpenItemDto { - OpenPageDtoOpenItemDto { - page: None, - size: None, - total: None, - content: None, - } - } -} - diff --git a/rust/src/models/open_release_dto.rs b/rust/src/models/open_release_dto.rs deleted file mode 100644 index b7dd4f6..0000000 --- a/rust/src/models/open_release_dto.rs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -/// OpenReleaseDto : Apollo发布信息数据传输对象,表示一次配置发布的完整信息 -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct OpenReleaseDto { - /// 发布创建者用户名,记录是谁创建了这次发布 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 发布最后修改者用户名,记录最后一次修改发布信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// 发布创建时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// 发布最后修改时间,ISO 8601格式的时间戳 - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// 发布记录的唯一标识符,系统自动生成 - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 所属命名空间的名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 发布名称,用于标识这次发布的版本或描述 - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "configurations", skip_serializing_if = "Option::is_none")] - pub configurations: Option>, - /// 发布备注,描述本次发布的变更内容和目的 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl OpenReleaseDto { - /// Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - pub fn new() -> OpenReleaseDto { - OpenReleaseDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - app_id: None, - cluster_name: None, - namespace_name: None, - name: None, - configurations: None, - comment: None, - } - } -} - diff --git a/rust/src/models/release_dto.rs b/rust/src/models/release_dto.rs deleted file mode 100644 index 939ec6b..0000000 --- a/rust/src/models/release_dto.rs +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Apollo OpenAPI - * - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ReleaseDto { - /// - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: Option, - /// - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// - #[serde(rename = "dataChangeLastModifiedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by_display_name: Option, - /// - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, - /// - #[serde(rename = "dataChangeLastModifiedTime", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_time: Option, - /// - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// - #[serde(rename = "releaseKey", skip_serializing_if = "Option::is_none")] - pub release_key: Option, - /// - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// - #[serde(rename = "configurations", skip_serializing_if = "Option::is_none")] - pub configurations: Option, - /// - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// - #[serde(rename = "isAbandoned", skip_serializing_if = "Option::is_none")] - pub is_abandoned: Option, -} - -impl ReleaseDto { - pub fn new() -> ReleaseDto { - ReleaseDto { - data_change_created_by: None, - data_change_last_modified_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - release_key: None, - name: None, - app_id: None, - cluster_name: None, - namespace_name: None, - configurations: None, - comment: None, - is_abandoned: None, - } - } -} - diff --git a/spring-boot2/.openapi-generator/FILES b/spring-boot2/.openapi-generator/FILES index 4d3297e..2584a64 100644 --- a/spring-boot2/.openapi-generator/FILES +++ b/spring-boot2/.openapi-generator/FILES @@ -30,44 +30,35 @@ src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java src/main/java/com/apollo/openapi/server/config/HomeController.java src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java -src/main/java/com/apollo/openapi/server/model/Change.java -src/main/java/com/apollo/openapi/server/model/ClusterDTO.java -src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java -src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java -src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java -src/main/java/com/apollo/openapi/server/model/ItemDTO.java src/main/java/com/apollo/openapi/server/model/KVEntity.java -src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java -src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java -src/main/java/com/apollo/openapi/server/model/MapString.java src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java -src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java +src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java +src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java +src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java -src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java -src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java src/main/resources/application.properties src/main/resources/openapi.yaml src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java diff --git a/spring-boot2/README.md b/spring-boot2/README.md index 5cd22b6..a34d2f2 100644 --- a/spring-boot2/README.md +++ b/spring-boot2/README.md @@ -18,4 +18,4 @@ Start your server as a simple java application You can view the api documentation in swagger-ui by pointing to http://localhost:8080/swagger-ui.html -Change default port value in application.properties \ No newline at end of file +Change default port value in application.properties diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java b/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java index b9eb816..644633a 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java @@ -27,4 +27,4 @@ public Module jsonNullableModule() { return new JsonNullableModule(); } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java b/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java index 09cf857..53fb801 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java @@ -35,4 +35,4 @@ public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fie public Object clone() { return this; } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java index fed9510..1d070ca 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java @@ -5,10 +5,10 @@ */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.EnvClusterInfo; import java.util.Map; import com.apollo.openapi.server.model.OpenAppDTO; import com.apollo.openapi.server.model.OpenEnvClusterDTO; +import com.apollo.openapi.server.model.OpenEnvClusterInfo; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import com.apollo.openapi.server.model.OpenapiV1AppsPost400Response; import com.apollo.openapi.server.model.OpenapiV1AppsPostRequest; @@ -36,7 +36,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "App Management", description = "应用管理相关接口,包括应用的创建、查询、更新、删除等操作") public interface AppManagementApi { @@ -50,9 +50,9 @@ default AppManagementApiDelegate getDelegate() { * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return AppNamespace删除成功 (status code 200) */ @Operation( operationId = "openapiV1AppsAppIdAppnamespacesNamespaceNameDelete", @@ -60,7 +60,7 @@ default AppManagementApiDelegate getDelegate() { description = "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "AppNamespace删除成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -73,10 +73,10 @@ default AppManagementApiDelegate getDelegate() { value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_DELETE, produces = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { return getDelegate().openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(appId, namespaceName); } @@ -87,7 +87,7 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelet * DELETE /openapi/v1/apps/{appId} : 删除应用 * DELETE /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) * @return 应用删除成功 (status code 200) * or 权限不足,需要超级管理员权限 (status code 403) * or 应用不存在 (status code 404) @@ -117,27 +117,27 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelet value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_DELETE, produces = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { return getDelegate().openapiV1AppsAppIdDelete(appId); } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENV_CLUSTERS_GET = "/openapi/v1/apps/{appId}/env-clusters"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVCLUSTERS_GET = "/openapi/v1/apps/{appId}/envclusters"; /** - * GET /openapi/v1/apps/{appId}/env-clusters : 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters + * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 + * GET /openapi/v1/apps/{appId}/envclusters * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用环境集群信息 (status code 200) * or 应用不存在 (status code 404) */ @Operation( - operationId = "openapiV1AppsAppIdEnvClustersGet", + operationId = "openapiV1AppsAppIdEnvclustersGet", summary = "获取应用的环境集群信息", - description = "GET /openapi/v1/apps/{appId}/env-clusters", + description = "GET /openapi/v1/apps/{appId}/envclusters", tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取应用环境集群信息", content = { @@ -153,14 +153,14 @@ default ResponseEntity openapiV1AppsAppIdDelete( ) @RequestMapping( method = RequestMethod.GET, - value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENV_CLUSTERS_GET, + value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVCLUSTERS_GET, produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdEnvClustersGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + + default ResponseEntity> openapiV1AppsAppIdEnvclustersGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().openapiV1AppsAppIdEnvClustersGet(appId); + return getDelegate().openapiV1AppsAppIdEnvclustersGet(appId); } @@ -169,11 +169,11 @@ default ResponseEntity> openapiV1AppsAppIdEnvClustersGet * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 解除关联成功 (status code 200) */ @Operation( operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete", @@ -181,7 +181,7 @@ default ResponseEntity> openapiV1AppsAppIdEnvClustersGet description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "解除关联成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -194,12 +194,12 @@ default ResponseEntity> openapiV1AppsAppIdEnvClustersGet value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS_DELETE, produces = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(appId, env, clusterName, namespaceName); } @@ -210,7 +210,7 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNames * GET /openapi/v1/apps/{appId} : 获取单个应用信息 * GET /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用信息 (status code 200) * or 应用不存在 (status code 404) */ @@ -236,9 +236,9 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNames value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { return getDelegate().openapiV1AppsAppIdGet(appId); } @@ -249,7 +249,7 @@ default ResponseEntity openapiV1AppsAppIdGet( * GET /openapi/v1/apps/{appId}/miss_envs : 查找缺失的环境 * GET /openapi/v1/apps/{appId}/miss_envs * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用缺失的环境列表 (status code 200) * or 应用不存在 (status code 404) */ @@ -275,9 +275,9 @@ default ResponseEntity openapiV1AppsAppIdGet( value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_MISS_ENVS_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1AppsAppIdMissEnvsGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { return getDelegate().openapiV1AppsAppIdMissEnvsGet(appId); } @@ -288,8 +288,8 @@ default ResponseEntity> openapiV1AppsAppIdMissEnvsGet( * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 * GET /openapi/v1/apps/{appId}/namespaces/releases/status * - * @param appId (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @return 成功获取发布状态映射 (status code 200) */ @Operation( operationId = "openapiV1AppsAppIdNamespacesReleasesStatusGet", @@ -297,7 +297,7 @@ default ResponseEntity> openapiV1AppsAppIdMissEnvsGet( description = "GET /openapi/v1/apps/{appId}/namespaces/releases/status", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "") + @ApiResponse(responseCode = "200", description = "成功获取发布状态映射") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -308,9 +308,9 @@ default ResponseEntity> openapiV1AppsAppIdMissEnvsGet( value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS_GET, produces = { "application/json" } ) - + default ResponseEntity>> openapiV1AppsAppIdNamespacesReleasesStatusGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { return getDelegate().openapiV1AppsAppIdNamespacesReleasesStatusGet(appId); } @@ -321,7 +321,7 @@ default ResponseEntity>> openapiV1AppsAppIdName * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树 * GET /openapi/v1/apps/{appId}/navtree * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用导航树 (status code 200) */ @Operation( @@ -331,7 +331,7 @@ default ResponseEntity>> openapiV1AppsAppIdName tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取应用导航树", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = EnvClusterInfo.class))) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenEnvClusterInfo.class))) }) }, security = { @@ -343,9 +343,9 @@ default ResponseEntity>> openapiV1AppsAppIdName value = AppManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_NAVTREE_GET, produces = { "application/json" } ) - - default ResponseEntity> openapiV1AppsAppIdNavtreeGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + + default ResponseEntity> openapiV1AppsAppIdNavtreeGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { return getDelegate().openapiV1AppsAppIdNavtreeGet(appId); } @@ -356,9 +356,9 @@ default ResponseEntity> openapiV1AppsAppIdNavtreeGet( * PUT /openapi/v1/apps/{appId} : 更新应用 * PUT /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) * @param openAppDTO (required) - * @return (status code 200) + * @return 应用更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @@ -368,7 +368,7 @@ default ResponseEntity> openapiV1AppsAppIdNavtreeGet( description = "PUT /openapi/v1/apps/{appId}", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "应用更新成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { @@ -388,9 +388,9 @@ default ResponseEntity> openapiV1AppsAppIdNavtreeGet( produces = { "application/json" }, consumes = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdPut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO ) { return getDelegate().openapiV1AppsAppIdPut(appId, openAppDTO); @@ -427,9 +427,9 @@ default ResponseEntity openapiV1AppsAppIdPut( value = AppManagementApi.PATH_OPENAPI_V1_APPS_BY_SELF_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1AppsBySelfGet( - + ) { return getDelegate().openapiV1AppsBySelfGet(); } @@ -440,7 +440,7 @@ default ResponseEntity> openapiV1AppsBySelfGet( * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用 * POST /openapi/v1/apps/envs/{env} * - * @param env (required) + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) * @param openAppDTO (required) * @return 应用在指定环境创建成功 (status code 200) * or 请求参数错误 (status code 400) @@ -472,9 +472,9 @@ default ResponseEntity> openapiV1AppsBySelfGet( produces = { "application/json" }, consumes = { "application/json" } ) - + default ResponseEntity openapiV1AppsEnvsEnvPost( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "env", description = "环境标识,例如 DEV、FAT、UAT、PROD", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO ) { return getDelegate().openapiV1AppsEnvsEnvPost(env, openAppDTO); @@ -484,7 +484,7 @@ default ResponseEntity openapiV1AppsEnvsEnvPost( public static final String PATH_OPENAPI_V1_APPS_GET = "/openapi/v1/apps"; /** * GET /openapi/v1/apps : 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true + * GET /openapi/v1/apps/authorized * * @param authorized 是否只返回授权的应用 (optional) * @return 成功获取授权应用列表 (status code 200) @@ -493,7 +493,7 @@ default ResponseEntity openapiV1AppsEnvsEnvPost( @Operation( operationId = "openapiV1AppsGet", summary = "获取当前Consumer授权的应用列表", - description = "GET /openapi/v1/apps?authorized=true", + description = "GET /openapi/v1/apps/authorized", tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取授权应用列表", content = { @@ -512,7 +512,7 @@ default ResponseEntity openapiV1AppsEnvsEnvPost( value = AppManagementApi.PATH_OPENAPI_V1_APPS_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1AppsGet( @Parameter(name = "authorized", description = "是否只返回授权的应用", in = ParameterIn.QUERY) @Valid @RequestParam(value = "authorized", required = false) @Nullable String authorized ) { @@ -556,7 +556,7 @@ default ResponseEntity> openapiV1AppsGet( produces = { "application/json" }, consumes = { "application/json" } ) - + default ResponseEntity openapiV1AppsPost( @Parameter(name = "OpenapiV1AppsPostRequest", description = "", required = true) @Valid @RequestBody OpenapiV1AppsPostRequest openapiV1AppsPostRequest ) { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java index fd7788a..0f1d4f9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java @@ -1,9 +1,9 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.EnvClusterInfo; import java.util.Map; import com.apollo.openapi.server.model.OpenAppDTO; import com.apollo.openapi.server.model.OpenEnvClusterDTO; +import com.apollo.openapi.server.model.OpenEnvClusterInfo; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import com.apollo.openapi.server.model.OpenapiV1AppsPost400Response; import com.apollo.openapi.server.model.OpenapiV1AppsPostRequest; @@ -32,7 +32,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class AppManagementApiController implements AppManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java index eda8966..41a5409 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java @@ -1,9 +1,9 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.EnvClusterInfo; import java.util.Map; import com.apollo.openapi.server.model.OpenAppDTO; import com.apollo.openapi.server.model.OpenEnvClusterDTO; +import com.apollo.openapi.server.model.OpenEnvClusterInfo; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; import com.apollo.openapi.server.model.OpenapiV1AppsPost400Response; import com.apollo.openapi.server.model.OpenapiV1AppsPostRequest; @@ -25,7 +25,7 @@ * A delegate to be called by the {@link AppManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface AppManagementApiDelegate { default Optional getRequest() { @@ -36,9 +36,9 @@ default Optional getRequest() { * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return AppNamespace删除成功 (status code 200) * @see AppManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameDelete */ default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(String appId, @@ -51,7 +51,7 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameDelet * DELETE /openapi/v1/apps/{appId} : 删除应用 * DELETE /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) * @return 应用删除成功 (status code 200) * or 权限不足,需要超级管理员权限 (status code 403) * or 应用不存在 (status code 404) @@ -82,15 +82,15 @@ default ResponseEntity openapiV1AppsAppIdDelete(Str } /** - * GET /openapi/v1/apps/{appId}/env-clusters : 获取应用的环境集群信息 - * GET /openapi/v1/apps/{appId}/env-clusters + * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 + * GET /openapi/v1/apps/{appId}/envclusters * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用环境集群信息 (status code 200) * or 应用不存在 (status code 404) - * @see AppManagementApi#openapiV1AppsAppIdEnvClustersGet + * @see AppManagementApi#openapiV1AppsAppIdEnvclustersGet */ - default ResponseEntity> openapiV1AppsAppIdEnvClustersGet(String appId) { + default ResponseEntity> openapiV1AppsAppIdEnvclustersGet(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -113,11 +113,11 @@ default ResponseEntity> openapiV1AppsAppIdEnvClustersGet * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 解除关联成功 (status code 200) * @see AppManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete */ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(String appId, @@ -132,7 +132,7 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNames * GET /openapi/v1/apps/{appId} : 获取单个应用信息 * GET /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用信息 (status code 200) * or 应用不存在 (status code 404) * @see AppManagementApi#openapiV1AppsAppIdGet @@ -160,7 +160,7 @@ default ResponseEntity openapiV1AppsAppIdGet(String appId) { * GET /openapi/v1/apps/{appId}/miss_envs : 查找缺失的环境 * GET /openapi/v1/apps/{appId}/miss_envs * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用缺失的环境列表 (status code 200) * or 应用不存在 (status code 404) * @see AppManagementApi#openapiV1AppsAppIdMissEnvsGet @@ -188,8 +188,8 @@ default ResponseEntity> openapiV1AppsAppIdMissEnvsGet(String appId) * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 * GET /openapi/v1/apps/{appId}/namespaces/releases/status * - * @param appId (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @return 成功获取发布状态映射 (status code 200) * @see AppManagementApi#openapiV1AppsAppIdNamespacesReleasesStatusGet */ default ResponseEntity>> openapiV1AppsAppIdNamespacesReleasesStatusGet(String appId) { @@ -201,15 +201,15 @@ default ResponseEntity>> openapiV1AppsAppIdName * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树 * GET /openapi/v1/apps/{appId}/navtree * - * @param appId (required) + * @param appId 应用ID (required) * @return 成功获取应用导航树 (status code 200) * @see AppManagementApi#openapiV1AppsAppIdNavtreeGet */ - default ResponseEntity> openapiV1AppsAppIdNavtreeGet(String appId) { + default ResponseEntity> openapiV1AppsAppIdNavtreeGet(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"env\" : \"env\", \"clusters\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ] }, { \"env\" : \"env\", \"clusters\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ] } ]"; + String exampleString = "[ { \"env\" : \"env\", \"clusters\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ] }, { \"env\" : \"env\", \"clusters\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ] } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -223,9 +223,9 @@ default ResponseEntity> openapiV1AppsAppIdNavtreeGet(String * PUT /openapi/v1/apps/{appId} : 更新应用 * PUT /openapi/v1/apps/{appId} * - * @param appId (required) + * @param appId 应用ID (required) * @param openAppDTO (required) - * @return (status code 200) + * @return 应用更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * @see AppManagementApi#openapiV1AppsAppIdPut @@ -286,7 +286,7 @@ default ResponseEntity> openapiV1AppsBySelfGet() { * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用 * POST /openapi/v1/apps/envs/{env} * - * @param env (required) + * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) * @param openAppDTO (required) * @return 应用在指定环境创建成功 (status code 200) * or 请求参数错误 (status code 400) @@ -320,7 +320,7 @@ default ResponseEntity openapiV1AppsEnvsEnvPost(Str /** * GET /openapi/v1/apps : 获取当前Consumer授权的应用列表 - * GET /openapi/v1/apps?authorized=true + * GET /openapi/v1/apps/authorized * * @param authorized 是否只返回授权的应用 (optional) * @return 成功获取授权应用列表 (status code 200) diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java index 43fd105..a31f7bd 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java @@ -32,7 +32,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Cluster Management", description = "集群管理相关接口,包括集群的创建、查询、删除等操作") public interface ClusterManagementApi { @@ -41,72 +41,36 @@ default ClusterManagementApiDelegate getDelegate() { return new ClusterManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_GET = "/openapi/v1/apps/{appId}/clusters/{clusterName}"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}"; /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * + * @param env (required) * @param appId (required) * @param clusterName (required) - * @return 成功获取集群信息 (status code 200) + * @return 集群删除成功 (status code 200) + * or 删除失败,集群可能包含配置 (status code 400) + * or 权限不足 (status code 403) * or 集群不存在 (status code 404) */ @Operation( - operationId = "openapiV1AppsAppIdClustersClusterNameGet", - summary = "获取指定集群信息", - description = "GET /openapi/v1/apps/{appId}/clusters/{clusterName}", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete", + summary = "删除集群", + description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", tags = { "Cluster Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取集群信息", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "集群不存在", content = { + @ApiResponse(responseCode = "200", description = "集群删除成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = ClusterManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_GET, - produces = { "application/json" } - ) - - default ResponseEntity openapiV1AppsAppIdClustersClusterNameGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName - ) { - return getDelegate().openapiV1AppsAppIdClustersClusterNameGet(appId, clusterName); - } - - - public static final String PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_POST = "/openapi/v1/apps/{appId}/clusters"; - /** - * POST /openapi/v1/apps/{appId}/clusters : 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * - * @param appId (required) - * @param openClusterDTO (required) - * @return 集群创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "openapiV1AppsAppIdClustersPost", - summary = "创建集群", - description = "POST /openapi/v1/apps/{appId}/clusters", - tags = { "Cluster Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "集群创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { + @ApiResponse(responseCode = "400", description = "删除失败,集群可能包含配置", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + }), + @ApiResponse(responseCode = "404", description = "集群不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }) }, security = { @@ -114,47 +78,39 @@ default ResponseEntity openapiV1AppsAppIdClustersClusterNameGet( } ) @RequestMapping( - method = RequestMethod.POST, - value = ClusterManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_POST, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.DELETE, + value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_DELETE, + produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdClustersPost( + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete( + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "OpenClusterDTO", description = "", required = true) @Valid @RequestBody OpenClusterDTO openClusterDTO + @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName ) { - return getDelegate().openapiV1AppsAppIdClustersPost(appId, openClusterDTO); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * - * @param env (required) * @param appId (required) * @param clusterName (required) - * @return 集群删除成功 (status code 200) - * or 删除失败,集群可能包含配置 (status code 400) - * or 权限不足 (status code 403) + * @param env (required) + * @return 成功获取集群信息 (status code 200) * or 集群不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete", - summary = "删除集群", - description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameGet", + summary = "获取指定集群信息", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", tags = { "Cluster Management" }, responses = { - @ApiResponse(responseCode = "200", description = "集群删除成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "400", description = "删除失败,集群可能包含配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "成功获取集群信息", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) }), @ApiResponse(responseCode = "404", description = "集群不存在", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) @@ -165,17 +121,17 @@ default ResponseEntity openapiV1AppsAppIdClustersPost( } ) @RequestMapping( - method = RequestMethod.DELETE, - value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_DELETE, + method = RequestMethod.GET, + value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameGet( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName + @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(env, appId, clusterName); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameGet(appId, clusterName, env); } @@ -184,11 +140,11 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 获取命名空间分支信息 * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取分支信息 (status code 200) * or 分支不存在 (status code 404) */ @Operation( @@ -197,7 +153,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", tags = { "Cluster Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取分支信息", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }), @ApiResponse(responseCode = "404", description = "分支不存在", content = { @@ -213,12 +169,12 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(appId, env, clusterName, namespaceName); } @@ -255,7 +211,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @@ -266,4 +222,52 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(appId, env, clusterName, namespaceName, fillItemDetail); } + + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters"; + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters : 创建集群 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * + * @param appId 应用ID (required) + * @param env (required) + * @param openClusterDTO (required) + * @return 集群创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + */ + @Operation( + operationId = "openapiV1EnvsEnvAppsAppIdClustersPost", + summary = "创建集群", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters", + tags = { "Cluster Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "集群创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) + }), + @ApiResponse(responseCode = "400", description = "请求参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = ClusterManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_POST, + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersPost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "OpenClusterDTO", description = "", required = true) @Valid @RequestBody OpenClusterDTO openClusterDTO + ) { + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersPost(appId, env, openClusterDTO); + } + } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java index d9c8964..26baec3 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java @@ -28,7 +28,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ClusterManagementApiController implements ClusterManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java index 44b2b78..3bbd7ac 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java @@ -21,7 +21,7 @@ * A delegate to be called by the {@link ClusterManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface ClusterManagementApiDelegate { default Optional getRequest() { @@ -29,52 +29,30 @@ default Optional getRequest() { } /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 + * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * + * @param env (required) * @param appId (required) * @param clusterName (required) - * @return 成功获取集群信息 (status code 200) + * @return 集群删除成功 (status code 200) + * or 删除失败,集群可能包含配置 (status code 400) + * or 权限不足 (status code 403) * or 集群不存在 (status code 404) - * @see ClusterManagementApi#openapiV1AppsAppIdClustersClusterNameGet + * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete */ - default ResponseEntity openapiV1AppsAppIdClustersClusterNameGet(String appId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(String env, + String appId, String clusterName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { String exampleString = "{ \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/clusters : 创建集群 - * POST /openapi/v1/apps/{appId}/clusters - * - * @param appId (required) - * @param openClusterDTO (required) - * @return 集群创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ClusterManagementApi#openapiV1AppsAppIdClustersPost - */ - default ResponseEntity openapiV1AppsAppIdClustersPost(String appId, - OpenClusterDTO openClusterDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; + String exampleString = "{ \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -95,35 +73,23 @@ default ResponseEntity openapiV1AppsAppIdClustersPost(String app } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 删除集群 - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} * - * @param env (required) * @param appId (required) * @param clusterName (required) - * @return 集群删除成功 (status code 200) - * or 删除失败,集群可能包含配置 (status code 400) - * or 权限不足 (status code 403) + * @param env (required) + * @return 成功获取集群信息 (status code 200) * or 集群不存在 (status code 404) - * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete + * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameGet */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(String env, - String appId, - String clusterName) { + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameGet(String appId, + String clusterName, + String env) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -142,11 +108,11 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 获取命名空间分支信息 * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取分支信息 (status code 200) * or 分支不存在 (status code 404) * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet */ @@ -202,4 +168,42 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste } + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters : 创建集群 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters + * + * @param appId 应用ID (required) + * @param env (required) + * @param openClusterDTO (required) + * @return 集群创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see ClusterManagementApi#openapiV1EnvsEnvAppsAppIdClustersPost + */ + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersPost(String appId, + String env, + OpenClusterDTO openClusterDTO) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + } 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 58b1c49..0d4f086 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 @@ -31,7 +31,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Instance Management", description = "实例管理相关接口,包括实例查询、配置生效状态等功能") public interface InstanceManagementApi { @@ -40,23 +40,24 @@ default InstanceManagementApiDelegate getDelegate() { return new InstanceManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET = "/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"; /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功返回实例数量 (status code 200) */ @Operation( - operationId = "openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet", summary = "获取命名空间下的实例数量", - description = "GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", tags = { "Instance Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功返回实例数量", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Integer.class)) }) }, @@ -66,38 +67,39 @@ default InstanceManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.GET, - value = InstanceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET, + value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet( - @Parameter(name = "appId", description = "", 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 + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet( + @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 ) { - return getDelegate().openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(appId, clusterName, namespaceName); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 查询不在指定发布版本中的实例 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in?excludeReleases=1,2,3 * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) - * @return (status code 200) + * @return 成功返回实例列表 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInGet", summary = "查询不在指定发布版本中的实例", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in?excludeReleases=1,2,3", tags = { "Instance Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功返回实例列表", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenInstanceDTO.class))) }) }, @@ -107,39 +109,42 @@ default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesN ) @RequestMapping( method = RequestMethod.GET, - value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_GET, + value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN_GET, produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "", 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, + + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInGet( + @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) @Nullable String excludeReleases ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(env, appId, clusterName, namespaceName, excludeReleases); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInGet(env, appId, clusterName, namespaceName, excludeReleases); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES_GET = "/openapi/v1/envs/{env}/releases/{releaseId}/instances"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_SEARCH_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search"; /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search : 根据发布版本查询实例(支持分页) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search * - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param appId (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @param instanceAppId (optional) + * @return 成功获取实例列表 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvReleasesReleaseIdInstancesGet", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesSearchGet", summary = "根据发布版本查询实例(支持分页)", - description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search", tags = { "Instance Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取实例列表", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenInstanceDTO.class)) }) }, @@ -149,17 +154,20 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC ) @RequestMapping( method = RequestMethod.GET, - value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES_GET, + value = InstanceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_SEARCH_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet( - @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 + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesSearchGet( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "appId", description = "", 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, + @NotNull @Parameter(name = "page", description = "页码,从0开始", 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 = "instanceAppId", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "instanceAppId", required = false) @Nullable String instanceAppId ) { - return getDelegate().openapiV1EnvsEnvReleasesReleaseIdInstancesGet(env, releaseId, page, size); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesSearchGet(env, appId, clusterName, namespaceName, page, size, instanceAppId); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java index fe583e5..732f121 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java @@ -27,7 +27,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class InstanceManagementApiController implements InstanceManagementApi { 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 fca7b6b..8ac1c02 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 @@ -20,7 +20,7 @@ * A delegate to be called by the {@link InstanceManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface InstanceManagementApiDelegate { default Optional getRequest() { @@ -28,16 +28,18 @@ default Optional getRequest() { } /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 获取命名空间下的实例数量 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances * - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - * @see InstanceManagementApi#openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet + * @param env (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功返回实例数量 (status code 200) + * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet */ - default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(String appId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(String env, + String appId, String clusterName, String namespaceName) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -45,18 +47,18 @@ default ResponseEntity openapiV1AppsAppIdClustersClusterNameNamespacesN } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances : 查询不在指定发布版本中的实例 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in?excludeReleases=1,2,3 * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) - * @return (status code 200) - * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet + * @return 成功返回实例列表 (status code 200) + * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInGet */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(String env, + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotInGet(String env, String appId, String clusterName, String namespaceName, @@ -64,7 +66,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ]"; + String exampleString = "[ { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -75,24 +77,30 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersC } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search : 根据发布版本查询实例(支持分页) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search * - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return (status code 200) - * @see InstanceManagementApi#openapiV1EnvsEnvReleasesReleaseIdInstancesGet + * @param env 环境标识 (required) + * @param appId (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @param instanceAppId (optional) + * @return 成功获取实例列表 (status code 200) + * @see InstanceManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesSearchGet */ - default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdInstancesGet(String env, - Integer releaseId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesSearchGet(String env, + String appId, + String clusterName, + String namespaceName, Integer page, - Integer size) { + Integer size, + String instanceAppId) { 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\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, { \"releaseDeliveryTime\" : \"releaseDeliveryTime\", \"release\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" } ], \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java index c895ca8..cad2a2a 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java @@ -5,14 +5,12 @@ */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListItemDiffs; -import com.apollo.openapi.server.model.NamespaceSyncModel; -import com.apollo.openapi.server.model.NamespaceTextModel; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceTextModel; import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -37,7 +35,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Item Management", description = "配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能") public interface ItemManagementApi { @@ -46,9 +44,9 @@ default ItemManagementApiDelegate getDelegate() { return new ItemManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_DELETE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @param appId (required) @@ -56,11 +54,11 @@ default ItemManagementApiDelegate getDelegate() { * @param clusterName (required) * @param namespaceName (required) * @param key (required) - * @param operator (required) + * @param operator (optional) * @return (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete", summary = "通过编码的key删除配置项", description = "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, @@ -75,39 +73,39 @@ default ItemManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.DELETE, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_DELETE, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_DELETE, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete( + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @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 = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + @Parameter(name = "operator", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) @Nullable String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_GET = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) * @return 成功获取配置项(支持编码key) (status code 200) * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet", summary = "通过查询参数获取配置项(支持编码的key)", - description = "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false}", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取配置项(支持编码key)", content = { @@ -123,32 +121,32 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames ) @RequestMapping( method = RequestMethod.GET, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_GET, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "key", description = "配置项键名(需要URL编码)", required = true, in = ParameterIn.PATH) @PathVariable("key") String key ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(appId, env, clusterName, namespaceName, key); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_PUT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) * @param openItemDTO (required) * @return 配置项更新成功(编码key) (status code 200) * or 请求参数错误 (status code 400) @@ -156,7 +154,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut", summary = "通过编码的key更新配置项", description = "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, @@ -180,50 +178,46 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName ) @RequestMapping( method = RequestMethod.PUT, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_PUT, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY_PUT, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "createIfNotExists", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true) Boolean createIfNotExists, + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "key", description = "配置项键名(需要URL编码)", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, + @NotNull @Parameter(name = "createIfNotExists", description = "若不存在则创建(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true) Boolean createIfNotExists, @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE_PUT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate : 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate : 通过文本批量修改配置项 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @return 批量更新配置项成功 (status code 200) - * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut", summary = "通过文本批量修改配置项", - description = "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "批量更新配置项成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), @ApiResponse(responseCode = "403", description = "权限不足", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }) @@ -234,84 +228,40 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ) @RequestMapping( method = RequestMethod.PUT, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE_PUT, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE_PUT, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "NamespaceTextModel", description = "", required = true) @Valid @RequestBody NamespaceTextModel namespaceTextModel - ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, namespaceTextModel); - } - - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare"; - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare : 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return 成功对比命名空间配置差异 (status code 200) - */ - @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost", - summary = "对比命名空间配置差异", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功对比命名空间配置差异", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = ListItemDiffs.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE_POST, - produces = { "application/json" }, - consumes = { "application/json" } - ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost( + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @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 = "NamespaceSyncModel", description = "", required = true) @Valid @RequestBody NamespaceSyncModel namespaceSyncModel + @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(appId, env, clusterName, namespaceName, namespaceSyncModel); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(appId, env, clusterName, namespaceName, openNamespaceTextModel); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_GET = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 - * + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 + * 获取指定命名空间的配置项列表,支持分页 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return 成功获取配置项列表 (status code 200) * or 命名空间不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsGet", summary = "获取命名空间下的配置项列表", - description = "", + description = "获取指定命名空间的配置项列表,支持分页", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取配置项列表", content = { @@ -327,42 +277,42 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu ) @RequestMapping( method = RequestMethod.GET, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_GET, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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, - @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 + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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, + @NotNull @Parameter(name = "page", description = "页码,从0开始", 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().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsGet(appId, env, clusterName, namespaceName, page, size); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_DELETE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_DELETE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (optional) + * @return 配置项删除成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyDelete", summary = "删除配置项", - description = "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "配置项删除成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -372,39 +322,39 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters ) @RequestMapping( method = RequestMethod.DELETE, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_DELETE, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_DELETE, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyDelete( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "key", description = "配置项键名", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) @Nullable String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(appId, env, clusterName, namespaceName, key, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_GET = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @return 成功获取配置项 (status code 200) * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyGet", summary = "获取单个配置项", - description = "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取配置项", content = { @@ -420,30 +370,30 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames ) @RequestMapping( method = RequestMethod.GET, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_GET, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "key", description = "配置项键名", required = true, in = ParameterIn.PATH) @PathVariable("key") String key ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyGet(appId, env, clusterName, namespaceName, key); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_PUT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param key (required) * @param createIfNotExists (required) * @param openItemDTO (required) @@ -453,9 +403,9 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName * or 配置项不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyPut", summary = "更新配置项", - description = "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", + description = "PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "配置项更新成功", content = { @@ -477,42 +427,42 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName ) @RequestMapping( method = RequestMethod.PUT, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_PUT, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY_PUT, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut( + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyPut( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, @NotNull @Parameter(name = "createIfNotExists", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true) Boolean createIfNotExists, @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyPut(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_POST = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param openItemDTO (required) * @return 配置项创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsPost", summary = "创建新的配置项", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", + description = "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "配置项创建成功", content = { @@ -531,26 +481,26 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ) @RequestMapping( method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_POST, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_POST, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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, + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsPost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsPost(appId, env, clusterName, namespaceName, openItemDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT_POST = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert : 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert : 撤销配置项更改 + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert * * @param appId (required) * @param env (required) @@ -561,9 +511,9 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsRevertPost", summary = "撤销配置项更改", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert", + description = "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "配置项更改撤销成功", content = { @@ -582,38 +532,37 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName ) @RequestMapping( method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT_POST, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT_POST, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost( + + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsRevertPost( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @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().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsRevertPost(appId, env, clusterName, namespaceName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC_POST = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync : 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync : 同步配置项到多个命名空间 + * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) * @return 配置项同步成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost", + operationId = "openapiV1AppsAppIdNamespacesNamespaceNameItemsSyncPost", summary = "同步配置项到多个命名空间", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync", + description = "POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "配置项同步成功", content = { @@ -632,46 +581,89 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ) @RequestMapping( method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC_POST, + value = ItemManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC_POST, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "NamespaceSyncModel", description = "", required = true) @Valid @RequestBody NamespaceSyncModel namespaceSyncModel + + default ResponseEntity openapiV1AppsAppIdNamespacesNamespaceNameItemsSyncPost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "OpenNamespaceSyncModel", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncModel openNamespaceSyncModel + ) { + return getDelegate().openapiV1AppsAppIdNamespacesNamespaceNameItemsSyncPost(appId, env, namespaceName, openNamespaceSyncModel); + } + + + public static final String PATH_OPENAPI_V1_NAMESPACES_ITEMS_COMPARE_POST = "/openapi/v1/namespaces/items:compare"; + /** + * POST /openapi/v1/namespaces/items:compare : 对比命名空间配置差异 + * POST /openapi/v1/namespaces/items:compare + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) + * @return 成功对比命名空间配置差异 (status code 200) + */ + @Operation( + operationId = "openapiV1NamespacesItemsComparePost", + summary = "对比命名空间配置差异", + description = "POST /openapi/v1/namespaces/items:compare", + tags = { "Item Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "成功对比命名空间配置差异", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDiffs.class))) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = ItemManagementApi.PATH_OPENAPI_V1_NAMESPACES_ITEMS_COMPARE_POST, + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity> openapiV1NamespacesItemsComparePost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "OpenNamespaceSyncModel", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncModel openNamespaceSyncModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(appId, env, clusterName, namespaceName, namespaceSyncModel); + return getDelegate().openapiV1NamespacesItemsComparePost(appId, env, clusterName, namespaceName, openNamespaceSyncModel); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate"; + public static final String PATH_VALIDATE_ITEMS = "/openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate : 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * POST /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate : 验证配置文本语法 + * POST /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @return 配置文本语法验证通过 (status code 200) * or 配置文本语法错误 (status code 400) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost", + operationId = "validateItems", summary = "验证配置文本语法", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate", + description = "POST /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "配置文本语法验证通过", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }), @ApiResponse(responseCode = "400", description = "配置文本语法错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }) }, security = { @@ -680,19 +672,19 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ) @RequestMapping( method = RequestMethod.POST, - value = ItemManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE_POST, + value = ItemManagementApi.PATH_VALIDATE_ITEMS, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost( + + default ResponseEntity validateItems( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @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 = "NamespaceTextModel", description = "", required = true) @Valid @RequestBody NamespaceTextModel namespaceTextModel + @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(appId, env, clusterName, namespaceName, namespaceTextModel); + return getDelegate().validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java index a473941..57992bb 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java @@ -1,13 +1,11 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListItemDiffs; -import com.apollo.openapi.server.model.NamespaceSyncModel; -import com.apollo.openapi.server.model.NamespaceTextModel; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceTextModel; import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import org.springframework.beans.factory.annotation.Autowired; @@ -33,7 +31,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ItemManagementApiController implements ItemManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java index 40324ea..08cd8c2 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java @@ -1,13 +1,11 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListItemDiffs; -import com.apollo.openapi.server.model.NamespaceSyncModel; -import com.apollo.openapi.server.model.NamespaceTextModel; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceTextModel; import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -26,7 +24,7 @@ * A delegate to be called by the {@link ItemManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface ItemManagementApiDelegate { default Optional getRequest() { @@ -34,7 +32,7 @@ default Optional getRequest() { } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key删除配置项 * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @param appId (required) @@ -42,11 +40,11 @@ default Optional getRequest() { * @param clusterName (required) * @param namespaceName (required) * @param key (required) - * @param operator (required) + * @param operator (optional) * @return (status code 200) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(String appId, String env, String clusterName, String namespaceName, @@ -57,19 +55,19 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过查询参数获取配置项(支持编码的key) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) * @return 成功获取配置项(支持编码key) (status code 200) * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(String appId, String env, String clusterName, String namespaceName, @@ -93,23 +91,23 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} : 通过编码的key更新配置项 * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param createIfNotExists (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名(需要URL编码) (required) + * @param createIfNotExists 若不存在则创建(true/false) (required) * @param openItemDTO (required) * @return 配置项更新成功(编码key) (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(String appId, String env, String clusterName, String namespaceName, @@ -145,24 +143,23 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate : 通过文本批量修改配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate : 通过文本批量修改配置项 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @return 批量更新配置项成功 (status code 200) - * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(String appId, String env, String clusterName, String namespaceName, - NamespaceTextModel namespaceTextModel) { + OpenNamespaceTextModel openNamespaceTextModel) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -175,41 +172,6 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare : 对比命名空间配置差异 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) - * @return 成功对比命名空间配置差异 (status code 200) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost - */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(String appId, - String env, - String clusterName, - String namespaceName, - NamespaceSyncModel namespaceSyncModel) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, \"extInfo\" : \"extInfo\" }, { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"type\" : 1, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"namespaceId\" : 6, \"lineNum\" : 5, \"comment\" : \"comment\", \"id\" : 0, \"value\" : \"value\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, \"extInfo\" : \"extInfo\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } } }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); @@ -217,20 +179,20 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 - * + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 + * 获取指定命名空间的配置项列表,支持分页 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @return 成功获取配置项列表 (status code 200) * or 命名空间不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsGet */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsGet(String appId, String env, String clusterName, String namespaceName, @@ -255,19 +217,19 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters } /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 删除配置项 + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @return (status code 200) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) + * @param operator 操作人用户名 (optional) + * @return 配置项删除成功 (status code 200) + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyDelete */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(String appId, String env, String clusterName, String namespaceName, @@ -278,19 +240,19 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 获取单个配置项 + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param key 配置项键名 (required) * @return 成功获取配置项 (status code 200) * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyGet */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyGet(String appId, String env, String clusterName, String namespaceName, @@ -314,13 +276,13 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} : 更新配置项 + * PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param key (required) * @param createIfNotExists (required) * @param openItemDTO (required) @@ -328,9 +290,9 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * or 配置项不存在 (status code 404) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyPut */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsKeyPut(String appId, String env, String clusterName, String namespaceName, @@ -366,20 +328,20 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param openItemDTO (required) * @return 配置项创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsPost */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsPost(String appId, String env, String clusterName, String namespaceName, @@ -408,8 +370,8 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert : 撤销配置项更改 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert : 撤销配置项更改 + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert * * @param appId (required) * @param env (required) @@ -418,9 +380,9 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterName * @return 配置项更改撤销成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost + * @see ItemManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsRevertPost */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(String appId, + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsRevertPost(String appId, String env, String clusterName, String namespaceName) { @@ -448,24 +410,22 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync : 同步配置项到多个命名空间 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync + * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync : 同步配置项到多个命名空间 + * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param namespaceSyncModel (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) * @return 配置项同步成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost + * @see ItemManagementApi#openapiV1AppsAppIdNamespacesNamespaceNameItemsSyncPost */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(String appId, + default ResponseEntity openapiV1AppsAppIdNamespacesNamespaceNameItemsSyncPost(String appId, String env, - String clusterName, String namespaceName, - NamespaceSyncModel namespaceSyncModel) { + OpenNamespaceSyncModel openNamespaceSyncModel) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -490,32 +450,62 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClu } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate : 验证配置文本语法 - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate + * POST /openapi/v1/namespaces/items:compare : 对比命名空间配置差异 + * POST /openapi/v1/namespaces/items:compare + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param openNamespaceSyncModel (required) + * @return 成功对比命名空间配置差异 (status code 200) + * @see ItemManagementApi#openapiV1NamespacesItemsComparePost + */ + default ResponseEntity> openapiV1NamespacesItemsComparePost(String appId, + String env, + String clusterName, + String namespaceName, + OpenNamespaceSyncModel openNamespaceSyncModel) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, \"extInfo\" : \"extInfo\" }, { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\" }, \"extInfo\" : \"extInfo\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate : 验证配置文本语法 + * POST /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param namespaceTextModel (required) + * @param openNamespaceTextModel (required) * @return 配置文本语法验证通过 (status code 200) * or 配置文本语法错误 (status code 400) - * @see ItemManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost + * @see ItemManagementApi#validateItems */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(String appId, + default ResponseEntity validateItems(String appId, String env, String clusterName, String namespaceName, - NamespaceTextModel namespaceTextModel) { + OpenNamespaceTextModel openNamespaceTextModel) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"valid\" : true, \"message\" : \"message\" }"; + String exampleString = "{ \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"valid\" : true, \"message\" : \"message\", \"errors\" : [ \"errors\", \"errors\" ] }"; + String exampleString = "{ \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java index 360b70d..d3be736 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java @@ -36,7 +36,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Namespace Branch Management", description = "the Namespace Branch Management API") public interface NamespaceBranchManagementApi { @@ -45,26 +45,30 @@ default NamespaceBranchManagementApiDelegate getDelegate() { return new NamespaceBranchManagementApiDelegate() {}; } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCH_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch"; + public static final String PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS_GET = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch : 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取分支下的配置项列表 (status code 200) + * or 分支不存在 (status code 404) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost", - summary = "创建命名空间分支", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch", + operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet", + summary = "获取分支下的配置项", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) + @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) + }), + @ApiResponse(responseCode = "404", description = "分支不存在", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }) }, security = { @@ -72,19 +76,19 @@ default NamespaceBranchManagementApiDelegate getDelegate() { } ) @RequestMapping( - method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCH_POST, + method = RequestMethod.GET, + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS_GET, produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + + default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(appId, env, clusterName, namespaceName, operator); + return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); } @@ -93,13 +97,13 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 删除命名空间分支 * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (optional) + * @return 分支删除成功 (status code 200) */ @Operation( operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete", @@ -107,7 +111,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "分支删除成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -120,14 +124,14 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_DELETE, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "", 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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) @Nullable String operator ) { return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(env, appId, clusterName, namespaceName, branchName, operator); } @@ -136,7 +140,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_DEL_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases"; /** * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 - * + * * * @param appId (required) * @param env (required) @@ -166,7 +170,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames produces = { "application/json" }, consumes = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @@ -179,26 +183,36 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 + * 合并灰度分支并可选择删除分支 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return 分支合并成功 (status code 200) + * or 合并参数错误 (status code 400) + * or 权限不足 (status code 403) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet", - summary = "获取分支灰度发布规则", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost", + summary = "合并分支", + description = "合并灰度分支并可选择删除分支", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenGrayReleaseRuleDTO.class)) + @ApiResponse(responseCode = "200", description = "分支合并成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) + }), + @ApiResponse(responseCode = "400", description = "合并参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) }) }, security = { @@ -206,44 +220,47 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } ) @RequestMapping( - method = RequestMethod.GET, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_GET, - produces = { "application/json" } + method = RequestMethod.POST, + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE_POST, + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @NotNull @Parameter(name = "deleteBranch", description = "合并后是否删除分支(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(appId, env, clusterName, namespaceName, branchName); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_PATCH = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}"; /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return 分支合并成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut", - summary = "更新分支灰度发布规则", - description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch", + summary = "合并分支到主分支", + description = "PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\")", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + @ApiResponse(responseCode = "200", description = "分支合并成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, security = { @@ -251,49 +268,46 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters } ) @RequestMapping( - method = RequestMethod.PUT, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_GRAY_RULES_PUT, + method = RequestMethod.PATCH, + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_PATCH, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "operator", description = "", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "operator", required = true) String operator, - @Parameter(name = "OpenGrayReleaseRuleDTO", description = "", required = true) @Valid @RequestBody OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch( + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @NotNull @Parameter(name = "deleteBranch", description = "合并后是否删除分支(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases"; /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 + * 在分支上创建灰度发布 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return 成功获取分支下的配置项列表 (status code 200) - * or 分支不存在 (status code 404) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param namespaceReleaseDTO (required) + * @return 灰度发布创建成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet", - summary = "获取分支下的配置项", - description = "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost", + summary = "创建灰度发布", + description = "在分支上创建灰度发布", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) - }), - @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "灰度发布创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, security = { @@ -301,52 +315,44 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames } ) @RequestMapping( - method = RequestMethod.GET, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS_GET, - produces = { "application/json" } + method = RequestMethod.POST, + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES_POST, + produces = { "application/json" }, + consumes = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(appId, env, clusterName, namespaceName, branchName); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 - * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 获取分支灰度发布规则 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param namespaceReleaseDTO (required) - * @return 分支合并成功 (status code 200) - * or 合并参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取灰度发布规则 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost", - summary = "合并分支", - description = "", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesGet", + summary = "获取分支灰度发布规则", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "分支合并成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "合并参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1AppsGet401Response.class)) + @ApiResponse(responseCode = "200", description = "成功获取灰度发布规则", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenGrayReleaseRuleDTO.class)) }) }, security = { @@ -354,48 +360,44 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClust } ) @RequestMapping( - method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_MERGE_POST, - produces = { "application/json" }, - consumes = { "application/json" } + method = RequestMethod.GET, + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES_GET, + produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "deleteBranch", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesGet(appId, env, clusterName, namespaceName, branchName); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_PATCH = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES_PUT = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules"; /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 更新分支灰度发布规则 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param openGrayReleaseRuleDTO (required) + * @param operator 操作人用户名 (optional) + * @return 灰度规则更新成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch", - summary = "合并分支到主分支", - description = "PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\")", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesPut", + summary = "更新分支灰度发布规则", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) + @ApiResponse(responseCode = "200", description = "灰度规则更新成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, security = { @@ -403,47 +405,45 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } ) @RequestMapping( - method = RequestMethod.PATCH, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_PATCH, + method = RequestMethod.PUT, + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES_PUT, produces = { "application/json" }, consumes = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "", 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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "deleteBranch", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, - @NotNull @Parameter(name = "X-Apollo-Operator", description = "", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "X-Apollo-Operator", required = true) String xApolloOperator, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesPut( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, + @Parameter(name = "OpenGrayReleaseRuleDTO", description = "", required = true) @Valid @RequestBody OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) @Nullable String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(env, appId, clusterName, namespaceName, branchName, deleteBranch, xApolloOperator, namespaceReleaseDTO); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesPut(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases"; + public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches"; /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 - * + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 创建命名空间分支 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (optional) + * @return 命名空间分支创建成功 (status code 200) */ @Operation( - operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost", - summary = "创建灰度发布", - description = "", + operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesPost", + summary = "创建命名空间分支", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) + @ApiResponse(responseCode = "200", description = "命名空间分支创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, security = { @@ -452,20 +452,18 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN ) @RequestMapping( method = RequestMethod.POST, - value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RELEASES_POST, - produces = { "application/json" }, - consumes = { "application/json" } + value = NamespaceBranchManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_POST, + produces = { "application/json" } ) - - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesPost( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) @Nullable String operator ) { - return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO); + return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesPost(appId, env, clusterName, namespaceName, operator); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java index 8ffc4b1..86b3ea9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java @@ -32,7 +32,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class NamespaceBranchManagementApiController implements NamespaceBranchManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java index ea75196..85e22d9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java @@ -25,7 +25,7 @@ * A delegate to be called by the {@link NamespaceBranchManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface NamespaceBranchManagementApiDelegate { default Optional getRequest() { @@ -33,26 +33,32 @@ default Optional getRequest() { } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch : 创建命名空间分支 - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取分支下的配置项列表 (status code 200) + * or 分支不存在 (status code 404) + * @see NamespaceBranchManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(String appId, + default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(String appId, String env, String clusterName, String namespaceName, - String operator) { + String branchName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -66,13 +72,13 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersCluste * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 删除命名空间分支 * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param operator 操作人用户名 (optional) + * @return 分支删除成功 (status code 200) * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete */ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(String env, @@ -87,7 +93,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNames /** * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 - * + * * * @param appId (required) * @param env (required) @@ -107,7 +113,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -118,26 +124,42 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 获取分支灰度发布规则 - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 + * 合并灰度分支并可选择删除分支 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return 分支合并成功 (status code 200) + * or 合并参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(String appId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(String appId, String env, String clusterName, String namespaceName, - String branchName) { + String branchName, + Boolean deleteBranch, + NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"branchName\" : \"branchName\", \"ruleItems\" : [ { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" }, { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"message\" : \"message\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"message\" : \"message\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -148,57 +170,30 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClusters } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules : 更新分支灰度发布规则 - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 + * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param operator (required) - * @param openGrayReleaseRuleDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (required) + * @param namespaceReleaseDTO (required) + * @return 分支合并成功 (status code 200) + * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(String appId, - String env, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(String env, + String appId, String clusterName, String namespaceName, String branchName, - String operator, - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @return 成功获取分支下的配置项列表 (status code 200) - * or 分支不存在 (status code 404) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet - */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(String appId, - String env, - String clusterName, - String namespaceName, - String branchName) { + Boolean deleteBranch, + NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -209,42 +204,28 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClust } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 - * + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 + * 在分支上创建灰度发布 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) * @param namespaceReleaseDTO (required) - * @return 分支合并成功 (status code 200) - * or 合并参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost + * @return 灰度发布创建成功 (status code 200) + * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(String appId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(String appId, String env, String clusterName, String namespaceName, String branchName, - Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"message\" : \"message\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -255,32 +236,26 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 获取分支灰度发布规则 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param deleteBranch (required) - * @param xApolloOperator (required) - * @param namespaceReleaseDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @return 成功获取灰度发布规则 (status code 200) + * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesGet */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(String env, - String appId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesGet(String appId, + String env, String clusterName, String namespaceName, - String branchName, - Boolean deleteBranch, - String xApolloOperator, - NamespaceReleaseDTO namespaceReleaseDTO) { + String branchName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"branchName\" : \"branchName\", \"ruleItems\" : [ { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" }, { \"clientIpList\" : [ \"clientIpList\", \"clientIpList\" ], \"clientLabelList\" : [ \"clientLabelList\", \"clientLabelList\" ], \"clientAppId\" : \"clientAppId\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -291,28 +266,51 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 - * + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules : 更新分支灰度发布规则 + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceReleaseDTO (required) - * @return (status code 200) - * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param openGrayReleaseRuleDTO (required) + * @param operator 操作人用户名 (optional) + * @return 灰度规则更新成功 (status code 200) + * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesPut */ - default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(String appId, + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRulesPut(String appId, String env, String clusterName, String namespaceName, String branchName, - NamespaceReleaseDTO namespaceReleaseDTO) { + OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, + String operator) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches : 创建命名空间分支 + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches + * + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (optional) + * @return 命名空间分支创建成功 (status code 200) + * @see NamespaceBranchManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesPost + */ + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesPost(String appId, + String env, + String clusterName, + String namespaceName, + String operator) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java index cb964e9..b85bfd9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java @@ -33,7 +33,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Namespace Management", description = "命名空间管理相关接口,包括命名空间的创建、查询、配置等操作") public interface NamespaceManagementApi { @@ -69,7 +69,7 @@ default NamespaceManagementApiDelegate getDelegate() { value = NamespaceManagementApi.PATH_OPENAPI_V1_APPNAMESPACES_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1AppnamespacesGet( @NotNull @Parameter(name = "publicOnly", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "publicOnly", required = true) Boolean publicOnly ) { @@ -104,7 +104,7 @@ default ResponseEntity> openapiV1AppnamespacesGet( value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1AppsAppIdAppnamespacesGet( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { @@ -117,9 +117,9 @@ default ResponseEntity> openapiV1AppsAppIdAppnamespace * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取AppNamespace (status code 200) */ @Operation( operationId = "openapiV1AppsAppIdAppnamespacesNamespaceNameGet", @@ -127,7 +127,7 @@ default ResponseEntity> openapiV1AppsAppIdAppnamespace description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取AppNamespace", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) }) }, @@ -140,10 +140,10 @@ default ResponseEntity> openapiV1AppsAppIdAppnamespace value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName ) { return getDelegate().openapiV1AppsAppIdAppnamespacesNamespaceNameGet(appId, namespaceName); } @@ -186,7 +186,7 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesNames produces = { "application/json" }, consumes = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "OpenAppNamespaceDTO", description = "", required = true) @Valid @RequestBody OpenAppNamespaceDTO openAppNamespaceDTO @@ -200,10 +200,10 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return 缺失的命名空间名称列表 (status code 200) */ @Operation( operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet", @@ -211,7 +211,7 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "缺失的命名空间名称列表", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) }) }, @@ -224,11 +224,11 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITY_CHECK_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName ) { return getDelegate().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(appId, env, clusterName); } @@ -239,11 +239,11 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取关联的公共Namespace (status code 200) */ @Operation( operationId = "openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet", @@ -251,7 +251,7 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取关联的公共Namespace", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, @@ -264,12 +264,12 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam value = NamespaceManagementApi.PATH_OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLIC_ASSOCIATION_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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().openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(appId, env, clusterName, namespaceName); } @@ -280,11 +280,11 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersCluste * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances * - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取实例列表 (status code 200) */ @Operation( operationId = "openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet", @@ -292,7 +292,7 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersCluste description = "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取实例列表", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) }) }, @@ -305,12 +305,12 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersCluste value = NamespaceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "publicNamespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("publicNamespaceName") String publicNamespaceName, - @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 = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "publicNamespaceName", description = "公共命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("publicNamespaceName") String publicNamespaceName, + @NotNull @Parameter(name = "page", description = "页码,从0开始", 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().openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(env, publicNamespaceName, page, size); } @@ -346,7 +346,7 @@ default ResponseEntity> openapiV1EnvsEnvAppnamespacesPubl value = NamespaceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, @@ -387,7 +387,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClusters value = NamespaceManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet( @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java index 38eabb5..096a4c2 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java @@ -29,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class NamespaceManagementApiController implements NamespaceManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java index 5c3f417..002d14b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java @@ -22,7 +22,7 @@ * A delegate to be called by the {@link NamespaceManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface NamespaceManagementApiDelegate { default Optional getRequest() { @@ -77,9 +77,9 @@ default ResponseEntity> openapiV1AppsAppIdAppnamespace * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取AppNamespace (status code 200) * @see NamespaceManagementApi#openapiV1AppsAppIdAppnamespacesNamespaceNameGet */ default ResponseEntity openapiV1AppsAppIdAppnamespacesNamespaceNameGet(String appId, @@ -137,10 +137,10 @@ default ResponseEntity openapiV1AppsAppIdAppnamespacesPost( * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return 缺失的命名空间名称列表 (status code 200) * @see NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet */ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(String appId, @@ -163,11 +163,11 @@ default ResponseEntity> openapiV1AppsAppIdEnvsEnvClustersClusterNam * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return 成功获取关联的公共Namespace (status code 200) * @see NamespaceManagementApi#openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet */ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(String appId, @@ -191,11 +191,11 @@ default ResponseEntity openapiV1AppsAppIdEnvsEnvClustersCluste * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances * - * @param env (required) - * @param publicNamespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取实例列表 (status code 200) * @see NamespaceManagementApi#openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet */ default ResponseEntity> openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(String env, diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java index b6892f9..e9c2e10 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java @@ -31,7 +31,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Organization Management", description = "组织管理相关接口,包括组织信息查询等功能") public interface OrganizationManagementApi { @@ -70,9 +70,9 @@ default OrganizationManagementApiDelegate getDelegate() { value = OrganizationManagementApi.PATH_OPENAPI_V1_ORGANIZATIONS_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1OrganizationsGet( - + ) { return getDelegate().openapiV1OrganizationsGet(); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java index 70ded65..9f02982 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java @@ -27,7 +27,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class OrganizationManagementApiController implements OrganizationManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java index 4e5ae76..f7bd618 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java @@ -20,7 +20,7 @@ * A delegate to be called by the {@link OrganizationManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface OrganizationManagementApiDelegate { default Optional getRequest() { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java index 1959f0d..8aa3129 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java @@ -5,11 +5,10 @@ */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListReleaseBO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseBO; import com.apollo.openapi.server.model.OpenReleaseDTO; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -34,7 +33,7 @@ import java.util.Map; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Validated @Tag(name = "Release Management", description = "发布管理相关接口,包括配置发布、发布历史、灰度发布等功能") public interface ReleaseManagementApi { @@ -48,13 +47,13 @@ default ReleaseManagementApiDelegate getDelegate() { * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active : 获取活跃发布(分页) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取活跃发布列表 (status code 200) */ @Operation( operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet", @@ -62,7 +61,7 @@ default ReleaseManagementApiDelegate getDelegate() { description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取活跃发布列表", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenReleaseDTO.class))) }) }, @@ -75,14 +74,14 @@ default ReleaseManagementApiDelegate getDelegate() { value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE_GET, produces = { "application/json" } ) - + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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, - @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 = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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, + @NotNull @Parameter(name = "page", description = "页码,从0开始", 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().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(appId, env, clusterName, namespaceName, page, size); } @@ -93,13 +92,13 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all : 获取所有发布(分页) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取发布列表 (status code 200) */ @Operation( operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet", @@ -107,8 +106,8 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = ListReleaseBO.class))) + @ApiResponse(responseCode = "200", description = "成功获取发布列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenReleaseBO.class))) }) }, security = { @@ -120,14 +119,14 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL_GET, produces = { "application/json" } ) - - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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, - @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 + + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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, + @NotNull @Parameter(name = "page", description = "页码,从0开始", 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().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(appId, env, clusterName, namespaceName, page, size); } @@ -136,19 +135,19 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST_GET = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest"; /** * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 - * + * 查询命名空间最新活跃发布 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @return 成功获取最新活跃发布 (status code 200) * or 未找到活跃发布 (status code 404) */ @Operation( operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet", summary = "获取最新活跃发布", - description = "", + description = "查询命名空间最新活跃发布", tags = { "Release Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取最新活跃发布", content = { @@ -167,12 +166,12 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_LATEST_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(appId, env, clusterName, namespaceName); } @@ -181,12 +180,12 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN public static final String PATH_OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_POST = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases"; /** * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 - * + * 创建并发布当前命名空间的配置 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param namespaceReleaseDTO (required) * @return 发布创建成功 (status code 200) * or 发布参数错误 (status code 400) @@ -195,7 +194,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN @Operation( operationId = "openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost", summary = "创建发布", - description = "", + description = "创建并发布当前命名空间的配置", tags = { "Release Management" }, responses = { @ApiResponse(responseCode = "200", description = "发布创建成功", content = { @@ -218,65 +217,26 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN produces = { "application/json" }, consumes = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @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 = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @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 = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO ) { return getDelegate().openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(appId, env, clusterName, namespaceName, namespaceReleaseDTO); } - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_COMPARE_GET = "/openapi/v1/envs/{env}/releases/compare"; - /** - * GET /openapi/v1/envs/{env}/releases/compare : 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare - * - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return (status code 200) - */ - @Operation( - operationId = "openapiV1EnvsEnvReleasesCompareGet", - summary = "对比发布", - description = "GET /openapi/v1/envs/{env}/releases/compare", - tags = { "Release Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenapiV1EnvsEnvReleasesCompareGet200Response.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_COMPARE_GET, - produces = { "application/json" } - ) - - default ResponseEntity openapiV1EnvsEnvReleasesCompareGet( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "baseReleaseId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "baseReleaseId", required = true) Integer baseReleaseId, - @NotNull @Parameter(name = "toCompareReleaseId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "toCompareReleaseId", required = true) Integer toCompareReleaseId - ) { - return getDelegate().openapiV1EnvsEnvReleasesCompareGet(env, baseReleaseId, toCompareReleaseId); - } - - public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_GET = "/openapi/v1/envs/{env}/releases/{releaseId}"; /** * GET /openapi/v1/envs/{env}/releases/{releaseId} : 获取发布详情 * GET /openapi/v1/envs/{env}/releases/{releaseId} * - * @param env (required) - * @param releaseId (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @return 成功获取发布详情 (status code 200) */ @Operation( operationId = "openapiV1EnvsEnvReleasesReleaseIdGet", @@ -284,7 +244,7 @@ default ResponseEntity openapiV1E description = "GET /openapi/v1/envs/{env}/releases/{releaseId}", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "成功获取发布详情", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }) }, @@ -297,10 +257,10 @@ default ResponseEntity openapiV1E value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_GET, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet( - @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 + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "releaseId", description = "发布ID", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId ) { return getDelegate().openapiV1EnvsEnvReleasesReleaseIdGet(env, releaseId); } @@ -309,20 +269,20 @@ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet( public static final String PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK_PUT = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback"; /** * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 - * + * 回滚到指定的发布版本 * - * @param env (required) - * @param releaseId (required) - * @param operator (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (optional) + * @return 发布回滚成功 (status code 200) */ @Operation( operationId = "openapiV1EnvsEnvReleasesReleaseIdRollbackPut", summary = "回滚发布", - description = "", + description = "回滚到指定的发布版本", tags = { "Release Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { + @ApiResponse(responseCode = "200", description = "发布回滚成功", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, @@ -335,11 +295,11 @@ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet( value = ReleaseManagementApi.PATH_OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_ROLLBACK_PUT, produces = { "application/json" } ) - + default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdRollbackPut( - @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 = "operator", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @Parameter(name = "releaseId", description = "发布ID", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) @Nullable String operator ) { return getDelegate().openapiV1EnvsEnvReleasesReleaseIdRollbackPut(env, releaseId, operator); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java index d9283d4..53eff96 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java @@ -1,10 +1,9 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListReleaseBO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseBO; import com.apollo.openapi.server.model.OpenReleaseDTO; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import org.springframework.beans.factory.annotation.Autowired; @@ -30,7 +29,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") @Controller @RequestMapping("${openapi.apolloOpen.base-path:}") public class ReleaseManagementApiController implements ReleaseManagementApi { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java index 711f2fd..29033fb 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java @@ -1,10 +1,9 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ListReleaseBO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseBO; import com.apollo.openapi.server.model.OpenReleaseDTO; import com.apollo.openapi.server.model.OpenapiV1AppsGet401Response; -import com.apollo.openapi.server.model.OpenapiV1EnvsEnvReleasesCompareGet200Response; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -23,7 +22,7 @@ * A delegate to be called by the {@link ReleaseManagementApiController}}. * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public interface ReleaseManagementApiDelegate { default Optional getRequest() { @@ -34,13 +33,13 @@ default Optional getRequest() { * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active : 获取活跃发布(分页) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取活跃发布列表 (status code 200) * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet */ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(String appId, @@ -52,7 +51,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" } ]"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -66,16 +65,16 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersCl * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all : 获取所有发布(分页) * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (required) - * @param size (required) - * @return (status code 200) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取发布列表 (status code 200) * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet */ - default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(String appId, + default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(String appId, String env, String clusterName, String namespaceName, @@ -84,7 +83,7 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"baseInfo\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"configurations\" : \"configurations\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"releaseKey\" : \"releaseKey\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"isAbandoned\" : true, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] }, { \"baseInfo\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"configurations\" : \"configurations\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"releaseKey\" : \"releaseKey\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"isAbandoned\" : true, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] } ]"; + String exampleString = "[ { \"baseInfo\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] }, { \"baseInfo\" : { \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }, \"items\" : [ { \"value\" : \"value\", \"key\" : \"key\" }, { \"value\" : \"value\", \"key\" : \"key\" } ] } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -96,12 +95,12 @@ default ResponseEntity> openapiV1EnvsEnvAppsAppIdClustersClu /** * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 - * + * 查询命名空间最新活跃发布 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @return 成功获取最新活跃发布 (status code 200) * or 未找到活跃发布 (status code 404) * @see ReleaseManagementApi#openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet @@ -113,7 +112,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -130,12 +129,12 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN /** * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 - * + * 创建并发布当前命名空间的配置 * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) * @param namespaceReleaseDTO (required) * @return 发布创建成功 (status code 200) * or 发布参数错误 (status code 400) @@ -150,7 +149,7 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -170,39 +169,13 @@ default ResponseEntity openapiV1EnvsEnvAppsAppIdClustersClusterN } - /** - * GET /openapi/v1/envs/{env}/releases/compare : 对比发布 - * GET /openapi/v1/envs/{env}/releases/compare - * - * @param env (required) - * @param baseReleaseId (required) - * @param toCompareReleaseId (required) - * @return (status code 200) - * @see ReleaseManagementApi#openapiV1EnvsEnvReleasesCompareGet - */ - default ResponseEntity openapiV1EnvsEnvReleasesCompareGet(String env, - Integer baseReleaseId, - Integer toCompareReleaseId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"changes\" : [ { \"type\" : \"ADDED\", \"entity\" : { \"firstEntity\" : { \"value\" : \"value\", \"key\" : \"key\" }, \"secondEntity\" : { \"value\" : \"value\", \"key\" : \"key\" } } }, { \"type\" : \"ADDED\", \"entity\" : { \"firstEntity\" : { \"value\" : \"value\", \"key\" : \"key\" }, \"secondEntity\" : { \"value\" : \"value\", \"key\" : \"key\" } } } ] }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - /** * GET /openapi/v1/envs/{env}/releases/{releaseId} : 获取发布详情 * GET /openapi/v1/envs/{env}/releases/{releaseId} * - * @param env (required) - * @param releaseId (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @return 成功获取发布详情 (status code 200) * @see ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdGet */ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet(String env, @@ -210,7 +183,7 @@ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet(Stri getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"key\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -222,12 +195,12 @@ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdGet(Stri /** * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 - * + * 回滚到指定的发布版本 * - * @param env (required) - * @param releaseId (required) - * @param operator (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param releaseId 发布ID (required) + * @param operator 操作人用户名 (optional) + * @return 发布回滚成功 (status code 200) * @see ReleaseManagementApi#openapiV1EnvsEnvReleasesReleaseIdRollbackPut */ default ResponseEntity openapiV1EnvsEnvReleasesReleaseIdRollbackPut(String env, diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java index 27331fe..c35d225 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java @@ -17,4 +17,4 @@ public String index() { return "redirect:swagger-ui.html"; } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java b/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java index 7936e69..14ac8b0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java @@ -19,7 +19,7 @@ OpenAPI apiInfo() { .info( new Info() .title("Apollo OpenAPI") - .description("Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` ") + .description("

Apollo配置中心OpenAPI接口文档

认证方式

所有 API 接口都需要通过 Authorization header 进行身份验证。

获取 Token 的方式:

  1. Portal 管理界面获取:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。
  2. Token 格式Authorization: token_value
  3. Token 权限:按应用/环境/命名空间授予,建议不同用途分别创建。

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
") .version("1.0.0") ) .components( @@ -32,4 +32,4 @@ OpenAPI apiInfo() { ) ; } -} \ No newline at end of file +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java deleted file mode 100644 index 155f89c..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/Change.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.EntityPairKVEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Change - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class Change { - - /** - * - */ - public enum TypeEnum { - ADDED("ADDED"), - - MODIFIED("MODIFIED"), - - DELETED("DELETED"); - - private final String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - private @Nullable TypeEnum type; - - private @Nullable EntityPairKVEntity entity; - - public Change type(@Nullable TypeEnum type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - - @Schema(name = "type", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("type") - public @Nullable TypeEnum getType() { - return type; - } - - public void setType(@Nullable TypeEnum type) { - this.type = type; - } - - public Change entity(@Nullable EntityPairKVEntity entity) { - this.entity = entity; - return this; - } - - /** - * Get entity - * @return entity - */ - @Valid - @Schema(name = "entity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("entity") - public @Nullable EntityPairKVEntity getEntity() { - return entity; - } - - public void setEntity(@Nullable EntityPairKVEntity entity) { - this.entity = entity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Change change = (Change) o; - return Objects.equals(this.type, change.type) && - Objects.equals(this.entity, change.entity); - } - - @Override - public int hashCode() { - return Objects.hash(type, entity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Change {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" entity: ").append(toIndentedString(entity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java deleted file mode 100644 index 6da5439..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ClusterDTO.java +++ /dev/null @@ -1,336 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ClusterDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ClusterDTO { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - private @Nullable Long id; - - private String name; - - private String appId; - - private @Nullable Long parentClusterId; - - private @Nullable String comment; - - public ClusterDTO() { - super(); - } - - /** - * Constructor with only required parameters - */ - public ClusterDTO(String name, String appId) { - this.name = name; - this.appId = appId; - } - - public ClusterDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ClusterDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ClusterDTO dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ClusterDTO dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ClusterDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ClusterDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ClusterDTO id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public ClusterDTO name(String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - @NotNull @Pattern(regexp = "[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*") - @Schema(name = "name", description = "", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ClusterDTO appId(String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - @NotNull - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("appId") - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public ClusterDTO parentClusterId(@Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - return this; - } - - /** - * - * @return parentClusterId - */ - - @Schema(name = "parentClusterId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("parentClusterId") - public @Nullable Long getParentClusterId() { - return parentClusterId; - } - - public void setParentClusterId(@Nullable Long parentClusterId) { - this.parentClusterId = parentClusterId; - } - - public ClusterDTO comment(@Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - - @Schema(name = "comment", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public @Nullable String getComment() { - return comment; - } - - public void setComment(@Nullable String comment) { - this.comment = comment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClusterDTO clusterDTO = (ClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, clusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, clusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, clusterDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, clusterDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, clusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, clusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, clusterDTO.id) && - Objects.equals(this.name, clusterDTO.name) && - Objects.equals(this.appId, clusterDTO.appId) && - Objects.equals(this.parentClusterId, clusterDTO.parentClusterId) && - Objects.equals(this.comment, clusterDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, name, appId, parentClusterId, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" parentClusterId: ").append(toIndentedString(parentClusterId)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java deleted file mode 100644 index a533297..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EntityPairKVEntity.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.KVEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * EntityPairKVEntity - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EntityPairKVEntity { - - private @Nullable KVEntity firstEntity; - - private @Nullable KVEntity secondEntity; - - public EntityPairKVEntity firstEntity(@Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - return this; - } - - /** - * Get firstEntity - * @return firstEntity - */ - @Valid - @Schema(name = "firstEntity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("firstEntity") - public @Nullable KVEntity getFirstEntity() { - return firstEntity; - } - - public void setFirstEntity(@Nullable KVEntity firstEntity) { - this.firstEntity = firstEntity; - } - - public EntityPairKVEntity secondEntity(@Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - return this; - } - - /** - * Get secondEntity - * @return secondEntity - */ - @Valid - @Schema(name = "secondEntity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("secondEntity") - public @Nullable KVEntity getSecondEntity() { - return secondEntity; - } - - public void setSecondEntity(@Nullable KVEntity secondEntity) { - this.secondEntity = secondEntity; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EntityPairKVEntity entityPairKVEntity = (EntityPairKVEntity) o; - return Objects.equals(this.firstEntity, entityPairKVEntity.firstEntity) && - Objects.equals(this.secondEntity, entityPairKVEntity.secondEntity); - } - - @Override - public int hashCode() { - return Objects.hash(firstEntity, secondEntity); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EntityPairKVEntity {\n"); - sb.append(" firstEntity: ").append(toIndentedString(firstEntity)).append("\n"); - sb.append(" secondEntity: ").append(toIndentedString(secondEntity)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java deleted file mode 100644 index f9b4a64..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemDTO.java +++ /dev/null @@ -1,372 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ItemDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemDTO { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - private @Nullable Long id; - - private @Nullable Long namespaceId; - - private @Nullable String key; - - private @Nullable Integer type; - - private @Nullable String value; - - private @Nullable String comment; - - private @Nullable Integer lineNum; - - public ItemDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ItemDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ItemDTO dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ItemDTO dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ItemDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ItemDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ItemDTO id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public ItemDTO namespaceId(@Nullable Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * - * @return namespaceId - */ - - @Schema(name = "namespaceId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceId") - public @Nullable Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(@Nullable Long namespaceId) { - this.namespaceId = namespaceId; - } - - public ItemDTO key(@Nullable String key) { - this.key = key; - return this; - } - - /** - * - * @return key - */ - - @Schema(name = "key", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public @Nullable String getKey() { - return key; - } - - public void setKey(@Nullable String key) { - this.key = key; - } - - public ItemDTO type(@Nullable Integer type) { - this.type = type; - return this; - } - - /** - * - * @return type - */ - - @Schema(name = "type", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("type") - public @Nullable Integer getType() { - return type; - } - - public void setType(@Nullable Integer type) { - this.type = type; - } - - public ItemDTO value(@Nullable String value) { - this.value = value; - return this; - } - - /** - * - * @return value - */ - - @Schema(name = "value", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("value") - public @Nullable String getValue() { - return value; - } - - public void setValue(@Nullable String value) { - this.value = value; - } - - public ItemDTO comment(@Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - - @Schema(name = "comment", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public @Nullable String getComment() { - return comment; - } - - public void setComment(@Nullable String comment) { - this.comment = comment; - } - - public ItemDTO lineNum(@Nullable Integer lineNum) { - this.lineNum = lineNum; - return this; - } - - /** - * - * @return lineNum - */ - - @Schema(name = "lineNum", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("lineNum") - public @Nullable Integer getLineNum() { - return lineNum; - } - - public void setLineNum(@Nullable Integer lineNum) { - this.lineNum = lineNum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ItemDTO itemDTO = (ItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, itemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, itemDTO.id) && - Objects.equals(this.namespaceId, itemDTO.namespaceId) && - Objects.equals(this.key, itemDTO.key) && - Objects.equals(this.type, itemDTO.type) && - Objects.equals(this.value, itemDTO.value) && - Objects.equals(this.comment, itemDTO.comment) && - Objects.equals(this.lineNum, itemDTO.lineNum); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, namespaceId, key, type, value, comment, lineNum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ItemDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" lineNum: ").append(toIndentedString(lineNum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java index f947e49..31d7df0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/KVEntity.java @@ -19,7 +19,7 @@ * KVEntity */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class KVEntity { private @Nullable String key; @@ -32,11 +32,11 @@ public KVEntity key(@Nullable String key) { } /** - * + * 键 * @return key */ - - @Schema(name = "key", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "key", description = "键", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("key") public @Nullable String getKey() { return key; @@ -52,11 +52,11 @@ public KVEntity value(@Nullable String value) { } /** - * + * 值 * @return value */ - - @Schema(name = "value", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "value", description = "值", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("value") public @Nullable String getValue() { return value; @@ -105,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java deleted file mode 100644 index 60990a1..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MapString.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * 字符串映射对象,用于表示键值对的配置数据结构 - */ - -@Schema(name = "MapString", description = "字符串映射对象,用于表示键值对的配置数据结构") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class MapString { - - private @Nullable String key; - - public MapString key(@Nullable String key) { - this.key = key; - return this; - } - - /** - * Get key - * @return key - */ - - @Schema(name = "key", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public @Nullable String getKey() { - return key; - } - - public void setKey(@Nullable String key) { - this.key = key; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapString mapString = (MapString) o; - return Objects.equals(this.key, mapString.key); - } - - @Override - public int hashCode() { - return Objects.hash(key); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapString {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java index 596c491..fe4b4bb 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java @@ -23,7 +23,7 @@ */ @Schema(name = "NamespaceGrayDelReleaseDTO", description = "命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class NamespaceGrayDelReleaseDTO { private @Nullable String releaseTitle; @@ -46,7 +46,7 @@ public NamespaceGrayDelReleaseDTO releaseTitle(@Nullable String releaseTitle) { * 发布标题,用于标识这次灰度删除发布的名称或版本号 * @return releaseTitle */ - + @Schema(name = "releaseTitle", description = "发布标题,用于标识这次灰度删除发布的名称或版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseTitle") public @Nullable String getReleaseTitle() { @@ -66,7 +66,7 @@ public NamespaceGrayDelReleaseDTO releaseComment(@Nullable String releaseComment * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 * @return releaseComment */ - + @Schema(name = "releaseComment", description = "发布备注,详细描述本次灰度删除发布的目的和删除的配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseComment") public @Nullable String getReleaseComment() { @@ -86,7 +86,7 @@ public NamespaceGrayDelReleaseDTO releasedBy(@Nullable String releasedBy) { * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 * @return releasedBy */ - + @Schema(name = "releasedBy", description = "发布操作者用户名,记录是谁执行了这次灰度删除发布操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releasedBy") public @Nullable String getReleasedBy() { @@ -106,7 +106,7 @@ public NamespaceGrayDelReleaseDTO isEmergencyPublish(@Nullable Boolean isEmergen * 是否为紧急发布,紧急发布可能会跳过某些审核流程 * @return isEmergencyPublish */ - + @Schema(name = "isEmergencyPublish", description = "是否为紧急发布,紧急发布可能会跳过某些审核流程", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isEmergencyPublish") public @Nullable Boolean getIsEmergencyPublish() { @@ -134,7 +134,7 @@ public NamespaceGrayDelReleaseDTO addGrayDelKeysItem(String grayDelKeysItem) { * 需要在灰度发布中删除的配置项键名列表 * @return grayDelKeys */ - + @Schema(name = "grayDelKeys", description = "需要在灰度发布中删除的配置项键名列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("grayDelKeys") public List getGrayDelKeys() { @@ -190,4 +190,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java index d849355..2791141 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java @@ -20,7 +20,7 @@ */ @Schema(name = "NamespaceReleaseDTO", description = "命名空间发布请求数据传输对象,用于创建新的配置发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class NamespaceReleaseDTO { private @Nullable String releaseTitle; @@ -40,7 +40,7 @@ public NamespaceReleaseDTO releaseTitle(@Nullable String releaseTitle) { * 发布标题,用于标识这次发布的名称或版本号 * @return releaseTitle */ - + @Schema(name = "releaseTitle", description = "发布标题,用于标识这次发布的名称或版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseTitle") public @Nullable String getReleaseTitle() { @@ -60,7 +60,7 @@ public NamespaceReleaseDTO releaseComment(@Nullable String releaseComment) { * 发布备注,详细描述本次发布的变更内容和目的 * @return releaseComment */ - + @Schema(name = "releaseComment", description = "发布备注,详细描述本次发布的变更内容和目的", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseComment") public @Nullable String getReleaseComment() { @@ -80,7 +80,7 @@ public NamespaceReleaseDTO releasedBy(@Nullable String releasedBy) { * 发布操作者用户名,记录是谁执行了这次发布操作 * @return releasedBy */ - + @Schema(name = "releasedBy", description = "发布操作者用户名,记录是谁执行了这次发布操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releasedBy") public @Nullable String getReleasedBy() { @@ -100,7 +100,7 @@ public NamespaceReleaseDTO isEmergencyPublish(@Nullable Boolean isEmergencyPubli * 是否为紧急发布,紧急发布可能会跳过某些审核流程 * @return isEmergencyPublish */ - + @Schema(name = "isEmergencyPublish", description = "是否为紧急发布,紧急发布可能会跳过某些审核流程", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isEmergencyPublish") public @Nullable Boolean getIsEmergencyPublish() { @@ -154,4 +154,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java index 6836431..6d4ae57 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java @@ -20,7 +20,7 @@ */ @Schema(name = "OpenAppDTO", description = "Apollo应用信息数据传输对象,包含应用的基本信息和元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenAppDTO { private @Nullable String dataChangeCreatedBy; @@ -52,7 +52,7 @@ public OpenAppDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { * 数据创建者用户名,记录是谁创建了这个应用 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "数据创建者用户名,记录是谁创建了这个应用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -72,7 +72,7 @@ public OpenAppDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifi * 数据最后修改者用户名,记录最后一次修改应用信息的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "数据最后修改者用户名,记录最后一次修改应用信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -92,7 +92,7 @@ public OpenAppDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) * 数据创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "数据创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -112,7 +112,7 @@ public OpenAppDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModi * 数据最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "数据最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -132,7 +132,7 @@ public OpenAppDTO name(@Nullable String name) { * 应用名称,用于显示的友好名称 * @return name */ - + @Schema(name = "name", description = "应用名称,用于显示的友好名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public @Nullable String getName() { @@ -152,7 +152,7 @@ public OpenAppDTO appId(@Nullable String appId) { * 应用唯一标识符,全局唯一的应用ID * @return appId */ - + @Schema(name = "appId", description = "应用唯一标识符,全局唯一的应用ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { @@ -172,7 +172,7 @@ public OpenAppDTO orgId(@Nullable String orgId) { * 组织ID,应用所属组织的唯一标识 * @return orgId */ - + @Schema(name = "orgId", description = "组织ID,应用所属组织的唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgId") public @Nullable String getOrgId() { @@ -192,7 +192,7 @@ public OpenAppDTO orgName(@Nullable String orgName) { * 组织名称,应用所属组织的显示名称 * @return orgName */ - + @Schema(name = "orgName", description = "组织名称,应用所属组织的显示名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgName") public @Nullable String getOrgName() { @@ -212,7 +212,7 @@ public OpenAppDTO ownerName(@Nullable String ownerName) { * 应用负责人姓名,应用的主要负责人 * @return ownerName */ - + @Schema(name = "ownerName", description = "应用负责人姓名,应用的主要负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ownerName") public @Nullable String getOwnerName() { @@ -232,7 +232,7 @@ public OpenAppDTO ownerEmail(@Nullable String ownerEmail) { * 应用负责人邮箱地址,用于接收应用相关通知 * @return ownerEmail */ - + @Schema(name = "ownerEmail", description = "应用负责人邮箱地址,用于接收应用相关通知", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ownerEmail") public @Nullable String getOwnerEmail() { @@ -298,4 +298,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java index 86e0577..56f8e61 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java @@ -20,7 +20,7 @@ */ @Schema(name = "OpenAppNamespaceDTO", description = "Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenAppNamespaceDTO { private @Nullable String dataChangeCreatedBy; @@ -52,7 +52,7 @@ public OpenAppNamespaceDTO dataChangeCreatedBy(@Nullable String dataChangeCreate * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "命名空间创建者用户名,记录是谁创建了这个应用命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -72,7 +72,7 @@ public OpenAppNamespaceDTO dataChangeLastModifiedBy(@Nullable String dataChangeL * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -92,7 +92,7 @@ public OpenAppNamespaceDTO dataChangeCreatedTime(@Nullable String dataChangeCrea * 命名空间创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "命名空间创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -112,7 +112,7 @@ public OpenAppNamespaceDTO dataChangeLastModifiedTime(@Nullable String dataChang * 命名空间最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "命名空间最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -132,7 +132,7 @@ public OpenAppNamespaceDTO name(@Nullable String name) { * 命名空间名称,在同一应用内唯一标识一个命名空间 * @return name */ - + @Schema(name = "name", description = "命名空间名称,在同一应用内唯一标识一个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public @Nullable String getName() { @@ -152,7 +152,7 @@ public OpenAppNamespaceDTO appId(@Nullable String appId) { * 所属应用的唯一标识符 * @return appId */ - + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { @@ -172,7 +172,7 @@ public OpenAppNamespaceDTO format(@Nullable String format) { * 命名空间格式类型,如properties、xml、json、yml等 * @return format */ - + @Schema(name = "format", description = "命名空间格式类型,如properties、xml、json、yml等", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("format") public @Nullable String getFormat() { @@ -192,7 +192,7 @@ public OpenAppNamespaceDTO isPublic(@Nullable Boolean isPublic) { * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 * @return isPublic */ - + @Schema(name = "isPublic", description = "是否为公共命名空间,公共命名空间可以被其他应用关联使用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isPublic") public @Nullable Boolean getIsPublic() { @@ -212,7 +212,7 @@ public OpenAppNamespaceDTO appendNamespacePrefix(Boolean appendNamespacePrefix) * 对于公共命名空间,是否在命名空间名称前添加前缀 * @return appendNamespacePrefix */ - + @Schema(name = "appendNamespacePrefix", description = "对于公共命名空间,是否在命名空间名称前添加前缀", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appendNamespacePrefix") public Boolean getAppendNamespacePrefix() { @@ -232,7 +232,7 @@ public OpenAppNamespaceDTO comment(@Nullable String comment) { * 命名空间备注说明,描述命名空间的用途和包含的配置类型 * @return comment */ - + @Schema(name = "comment", description = "命名空间备注说明,描述命名空间的用途和包含的配置类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") public @Nullable String getComment() { @@ -298,4 +298,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java index b4d9f9f..5d9f686 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java @@ -20,7 +20,7 @@ */ @Schema(name = "OpenClusterDTO", description = "Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenClusterDTO { private @Nullable String dataChangeCreatedBy; @@ -44,7 +44,7 @@ public OpenClusterDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) * 集群创建者用户名,记录是谁创建了这个集群 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "集群创建者用户名,记录是谁创建了这个集群", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -64,7 +64,7 @@ public OpenClusterDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastMo * 集群最后修改者用户名,记录最后一次修改集群信息的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "集群最后修改者用户名,记录最后一次修改集群信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -84,7 +84,7 @@ public OpenClusterDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTi * 集群创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "集群创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -104,7 +104,7 @@ public OpenClusterDTO dataChangeLastModifiedTime(@Nullable String dataChangeLast * 集群最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "集群最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -124,7 +124,7 @@ public OpenClusterDTO name(@Nullable String name) { * 集群名称,在同一应用和环境下唯一标识一个集群 * @return name */ - + @Schema(name = "name", description = "集群名称,在同一应用和环境下唯一标识一个集群", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public @Nullable String getName() { @@ -144,7 +144,7 @@ public OpenClusterDTO appId(@Nullable String appId) { * 所属应用的唯一标识符 * @return appId */ - + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { @@ -202,4 +202,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java index 71c37b3..1061b1c 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java @@ -24,7 +24,7 @@ */ @Schema(name = "OpenCreateAppDTO", description = "创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenCreateAppDTO { private @Nullable Boolean assignAppRoleToSelf; @@ -43,7 +43,7 @@ public OpenCreateAppDTO assignAppRoleToSelf(@Nullable Boolean assignAppRoleToSel * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 * @return assignAppRoleToSelf */ - + @Schema(name = "assignAppRoleToSelf", description = "是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("assignAppRoleToSelf") public @Nullable Boolean getAssignAppRoleToSelf() { @@ -71,7 +71,7 @@ public OpenCreateAppDTO addAdminsItem(String adminsItem) { * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 * @return admins */ - + @Schema(name = "admins", description = "应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("admins") public List getAdmins() { @@ -91,7 +91,7 @@ public OpenCreateAppDTO app(@Nullable OpenAppDTO app) { * Get app * @return app */ - @Valid + @Valid @Schema(name = "app", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("app") public @Nullable OpenAppDTO getApp() { @@ -143,4 +143,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java index 48ff056..20000d4 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java @@ -22,7 +22,7 @@ * OpenEnvClusterDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenEnvClusterDTO { private @Nullable String env; @@ -36,11 +36,11 @@ public OpenEnvClusterDTO env(@Nullable String env) { } /** - * + * 环境标识,例如 DEV、FAT、UAT、PROD * @return env */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "env", description = "环境标识,例如 DEV、FAT、UAT、PROD", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") public @Nullable String getEnv() { return env; @@ -64,11 +64,11 @@ public OpenEnvClusterDTO addClustersItem(String clustersItem) { } /** - * + * 该环境下的集群名称列表 * @return clusters */ - - @Schema(name = "clusters", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "clusters", description = "该环境下的集群名称列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusters") public List getClusters() { return clusters; @@ -117,4 +117,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java similarity index 65% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java index 57838ca..0508b14 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/EnvClusterInfo.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java @@ -2,7 +2,7 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ClusterDTO; +import com.apollo.openapi.server.model.OpenClusterDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; @@ -20,28 +20,28 @@ import javax.annotation.Generated; /** - * EnvClusterInfo + * OpenEnvClusterInfo */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class EnvClusterInfo { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenEnvClusterInfo { private @Nullable String env; @Valid - private List<@Valid ClusterDTO> clusters = new ArrayList<>(); + private List<@Valid OpenClusterDTO> clusters = new ArrayList<>(); - public EnvClusterInfo env(@Nullable String env) { + public OpenEnvClusterInfo env(@Nullable String env) { this.env = env; return this; } /** - * + * 环境标识 * @return env */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "env", description = "环境标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") public @Nullable String getEnv() { return env; @@ -51,12 +51,12 @@ public void setEnv(@Nullable String env) { this.env = env; } - public EnvClusterInfo clusters(List<@Valid ClusterDTO> clusters) { + public OpenEnvClusterInfo clusters(List<@Valid OpenClusterDTO> clusters) { this.clusters = clusters; return this; } - public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { + public OpenEnvClusterInfo addClustersItem(OpenClusterDTO clustersItem) { if (this.clusters == null) { this.clusters = new ArrayList<>(); } @@ -65,17 +65,17 @@ public EnvClusterInfo addClustersItem(ClusterDTO clustersItem) { } /** - * + * 集群信息列表 * @return clusters */ - @Valid - @Schema(name = "clusters", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "clusters", description = "集群信息列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusters") - public List<@Valid ClusterDTO> getClusters() { + public List<@Valid OpenClusterDTO> getClusters() { return clusters; } - public void setClusters(List<@Valid ClusterDTO> clusters) { + public void setClusters(List<@Valid OpenClusterDTO> clusters) { this.clusters = clusters; } @@ -87,9 +87,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - EnvClusterInfo envClusterInfo = (EnvClusterInfo) o; - return Objects.equals(this.env, envClusterInfo.env) && - Objects.equals(this.clusters, envClusterInfo.clusters); + OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; + return Objects.equals(this.env, openEnvClusterInfo.env) && + Objects.equals(this.clusters, openEnvClusterInfo.clusters); } @Override @@ -100,7 +100,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class EnvClusterInfo {\n"); + sb.append("class OpenEnvClusterInfo {\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); sb.append("}"); @@ -118,4 +118,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java index 12495a4..af8237a 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java @@ -24,7 +24,7 @@ */ @Schema(name = "OpenGrayReleaseRuleDTO", description = "Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenGrayReleaseRuleDTO { private @Nullable String dataChangeCreatedBy; @@ -55,7 +55,7 @@ public OpenGrayReleaseRuleDTO dataChangeCreatedBy(@Nullable String dataChangeCre * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "灰度规则创建者用户名,记录是谁创建了这个灰度发布规则", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -75,7 +75,7 @@ public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(@Nullable String dataChan * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "灰度规则最后修改者用户名,记录最后一次修改规则的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -95,7 +95,7 @@ public OpenGrayReleaseRuleDTO dataChangeCreatedTime(@Nullable String dataChangeC * 灰度规则创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "灰度规则创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -115,7 +115,7 @@ public OpenGrayReleaseRuleDTO dataChangeLastModifiedTime(@Nullable String dataCh * 灰度规则最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "灰度规则最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -135,7 +135,7 @@ public OpenGrayReleaseRuleDTO appId(@Nullable String appId) { * 所属应用的唯一标识符 * @return appId */ - + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { @@ -155,7 +155,7 @@ public OpenGrayReleaseRuleDTO clusterName(@Nullable String clusterName) { * 所属集群的名称 * @return clusterName */ - + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") public @Nullable String getClusterName() { @@ -175,7 +175,7 @@ public OpenGrayReleaseRuleDTO namespaceName(@Nullable String namespaceName) { * 所属命名空间的名称 * @return namespaceName */ - + @Schema(name = "namespaceName", description = "所属命名空间的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") public @Nullable String getNamespaceName() { @@ -195,7 +195,7 @@ public OpenGrayReleaseRuleDTO branchName(@Nullable String branchName) { * 灰度分支名称,标识灰度发布的分支 * @return branchName */ - + @Schema(name = "branchName", description = "灰度分支名称,标识灰度发布的分支", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("branchName") public @Nullable String getBranchName() { @@ -223,7 +223,7 @@ public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleIt * 灰度发布规则项列表,包含具体的灰度规则条件 * @return ruleItems */ - @Valid + @Valid @Schema(name = "ruleItems", description = "灰度发布规则项列表,包含具体的灰度规则条件", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ruleItems") public List<@Valid OpenGrayReleaseRuleItemDTO> getRuleItems() { @@ -287,4 +287,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java index 0a8362c..3d204d1 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java @@ -23,7 +23,7 @@ */ @Schema(name = "OpenGrayReleaseRuleItemDTO", description = "Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenGrayReleaseRuleItemDTO { private @Nullable String clientAppId; @@ -43,7 +43,7 @@ public OpenGrayReleaseRuleItemDTO clientAppId(@Nullable String clientAppId) { * 客户端应用ID,指定哪个应用可以获取灰度配置 * @return clientAppId */ - + @Schema(name = "clientAppId", description = "客户端应用ID,指定哪个应用可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientAppId") public @Nullable String getClientAppId() { @@ -71,7 +71,7 @@ public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 * @return clientIpList */ - + @Schema(name = "clientIpList", description = "客户端IP地址列表,指定哪些IP地址可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientIpList") public List getClientIpList() { @@ -99,7 +99,7 @@ public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListI * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 * @return clientLabelList */ - + @Schema(name = "clientLabelList", description = "客户端标签列表,通过标签来识别可以获取灰度配置的客户端", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientLabelList") public List getClientLabelList() { @@ -151,4 +151,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java index 20c060b..f96ab0b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java @@ -20,7 +20,7 @@ * OpenInstanceConfigDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenInstanceConfigDTO { private @Nullable OpenReleaseDTO release; @@ -38,7 +38,7 @@ public OpenInstanceConfigDTO release(@Nullable OpenReleaseDTO release) { * Get release * @return release */ - @Valid + @Valid @Schema(name = "release", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("release") public @Nullable OpenReleaseDTO getRelease() { @@ -55,11 +55,11 @@ public OpenInstanceConfigDTO releaseDeliveryTime(@Nullable String releaseDeliver } /** - * + * 配置下发时间(ISO 8601) * @return releaseDeliveryTime */ - - @Schema(name = "releaseDeliveryTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "releaseDeliveryTime", description = "配置下发时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("releaseDeliveryTime") public @Nullable String getReleaseDeliveryTime() { return releaseDeliveryTime; @@ -75,11 +75,11 @@ public OpenInstanceConfigDTO dataChangeLastModifiedTime(@Nullable String dataCha } /** - * + * 最后修改时间(ISO 8601) * @return dataChangeLastModifiedTime */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeLastModifiedTime", description = "最后修改时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; @@ -130,4 +130,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java index d2cb7c2..9572804 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java @@ -23,7 +23,7 @@ * OpenInstanceDTO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenInstanceDTO { private @Nullable Long id; @@ -47,11 +47,11 @@ public OpenInstanceDTO id(@Nullable Long id) { } /** - * + * 实例ID * @return id */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "id", description = "实例ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public @Nullable Long getId() { return id; @@ -67,11 +67,11 @@ public OpenInstanceDTO appId(@Nullable String appId) { } /** - * + * 实例所属应用ID * @return appId */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "appId", description = "实例所属应用ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { return appId; @@ -87,11 +87,11 @@ public OpenInstanceDTO clusterName(@Nullable String clusterName) { } /** - * + * 实例所属集群名称 * @return clusterName */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "clusterName", description = "实例所属集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") public @Nullable String getClusterName() { return clusterName; @@ -107,11 +107,11 @@ public OpenInstanceDTO dataCenter(@Nullable String dataCenter) { } /** - * + * 数据中心/机房标识 * @return dataCenter */ - - @Schema(name = "dataCenter", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataCenter", description = "数据中心/机房标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataCenter") public @Nullable String getDataCenter() { return dataCenter; @@ -127,11 +127,11 @@ public OpenInstanceDTO ip(@Nullable String ip) { } /** - * + * 实例IP地址 * @return ip */ - - @Schema(name = "ip", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "ip", description = "实例IP地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ip") public @Nullable String getIp() { return ip; @@ -155,11 +155,11 @@ public OpenInstanceDTO addConfigsItem(OpenInstanceConfigDTO configsItem) { } /** - * + * 实例当前生效的配置列表 * @return configs */ - @Valid - @Schema(name = "configs", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "configs", description = "实例当前生效的配置列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("configs") public List<@Valid OpenInstanceConfigDTO> getConfigs() { return configs; @@ -175,11 +175,11 @@ public OpenInstanceDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedT } /** - * + * 数据创建时间(ISO 8601) * @return dataChangeCreatedTime */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeCreatedTime", description = "数据创建时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { return dataChangeCreatedTime; @@ -238,4 +238,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java similarity index 61% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java index fbb14e0..38ae063 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ItemChangeSets.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemChangeSets.java @@ -2,7 +2,7 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ItemDTO; +import com.apollo.openapi.server.model.OpenItemDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; @@ -20,11 +20,11 @@ import javax.annotation.Generated; /** - * ItemChangeSets + * OpenItemChangeSets */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ItemChangeSets { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenItemChangeSets { private @Nullable String dataChangeCreatedBy; @@ -39,25 +39,25 @@ public class ItemChangeSets { private @Nullable String dataChangeLastModifiedTime; @Valid - private List<@Valid ItemDTO> createItems = new ArrayList<>(); + private List<@Valid OpenItemDTO> createItems = new ArrayList<>(); @Valid - private List<@Valid ItemDTO> updateItems = new ArrayList<>(); + private List<@Valid OpenItemDTO> updateItems = new ArrayList<>(); @Valid - private List<@Valid ItemDTO> deleteItems = new ArrayList<>(); + private List<@Valid OpenItemDTO> deleteItems = new ArrayList<>(); - public ItemChangeSets dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { + public OpenItemChangeSets dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } /** - * + * 变更集合创建者用户名 * @return dataChangeCreatedBy */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeCreatedBy", description = "变更集合创建者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { return dataChangeCreatedBy; @@ -67,17 +67,17 @@ public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; } - public ItemChangeSets dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { + public OpenItemChangeSets dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } /** - * + * 变更集合最后修改者用户名 * @return dataChangeLastModifiedBy */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeLastModifiedBy", description = "变更集合最后修改者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { return dataChangeLastModifiedBy; @@ -87,17 +87,17 @@ public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedB this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public ItemChangeSets dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { + public OpenItemChangeSets dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; return this; } /** - * + * 创建者显示名 * @return dataChangeCreatedByDisplayName */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeCreatedByDisplayName", description = "创建者显示名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedByDisplayName") public @Nullable String getDataChangeCreatedByDisplayName() { return dataChangeCreatedByDisplayName; @@ -107,17 +107,17 @@ public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreated this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; } - public ItemChangeSets dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { + public OpenItemChangeSets dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; return this; } /** - * + * 最后修改者显示名 * @return dataChangeLastModifiedByDisplayName */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeLastModifiedByDisplayName", description = "最后修改者显示名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedByDisplayName") public @Nullable String getDataChangeLastModifiedByDisplayName() { return dataChangeLastModifiedByDisplayName; @@ -127,17 +127,17 @@ public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLa this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; } - public ItemChangeSets dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { + public OpenItemChangeSets dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } /** - * + * 变更集合创建时间(ISO 8601) * @return dataChangeCreatedTime */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeCreatedTime", description = "变更集合创建时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { return dataChangeCreatedTime; @@ -147,17 +147,17 @@ public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { this.dataChangeCreatedTime = dataChangeCreatedTime; } - public ItemChangeSets dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { + public OpenItemChangeSets dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } /** - * + * 变更集合最后修改时间(ISO 8601) * @return dataChangeLastModifiedTime */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "dataChangeLastModifiedTime", description = "变更集合最后修改时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { return dataChangeLastModifiedTime; @@ -167,12 +167,12 @@ public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifie this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public ItemChangeSets createItems(List<@Valid ItemDTO> createItems) { + public OpenItemChangeSets createItems(List<@Valid OpenItemDTO> createItems) { this.createItems = createItems; return this; } - public ItemChangeSets addCreateItemsItem(ItemDTO createItemsItem) { + public OpenItemChangeSets addCreateItemsItem(OpenItemDTO createItemsItem) { if (this.createItems == null) { this.createItems = new ArrayList<>(); } @@ -181,26 +181,26 @@ public ItemChangeSets addCreateItemsItem(ItemDTO createItemsItem) { } /** - * + * 待创建的配置项列表 * @return createItems */ - @Valid - @Schema(name = "createItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "createItems", description = "待创建的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("createItems") - public List<@Valid ItemDTO> getCreateItems() { + public List<@Valid OpenItemDTO> getCreateItems() { return createItems; } - public void setCreateItems(List<@Valid ItemDTO> createItems) { + public void setCreateItems(List<@Valid OpenItemDTO> createItems) { this.createItems = createItems; } - public ItemChangeSets updateItems(List<@Valid ItemDTO> updateItems) { + public OpenItemChangeSets updateItems(List<@Valid OpenItemDTO> updateItems) { this.updateItems = updateItems; return this; } - public ItemChangeSets addUpdateItemsItem(ItemDTO updateItemsItem) { + public OpenItemChangeSets addUpdateItemsItem(OpenItemDTO updateItemsItem) { if (this.updateItems == null) { this.updateItems = new ArrayList<>(); } @@ -209,26 +209,26 @@ public ItemChangeSets addUpdateItemsItem(ItemDTO updateItemsItem) { } /** - * + * 待更新的配置项列表 * @return updateItems */ - @Valid - @Schema(name = "updateItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "updateItems", description = "待更新的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("updateItems") - public List<@Valid ItemDTO> getUpdateItems() { + public List<@Valid OpenItemDTO> getUpdateItems() { return updateItems; } - public void setUpdateItems(List<@Valid ItemDTO> updateItems) { + public void setUpdateItems(List<@Valid OpenItemDTO> updateItems) { this.updateItems = updateItems; } - public ItemChangeSets deleteItems(List<@Valid ItemDTO> deleteItems) { + public OpenItemChangeSets deleteItems(List<@Valid OpenItemDTO> deleteItems) { this.deleteItems = deleteItems; return this; } - public ItemChangeSets addDeleteItemsItem(ItemDTO deleteItemsItem) { + public OpenItemChangeSets addDeleteItemsItem(OpenItemDTO deleteItemsItem) { if (this.deleteItems == null) { this.deleteItems = new ArrayList<>(); } @@ -237,17 +237,17 @@ public ItemChangeSets addDeleteItemsItem(ItemDTO deleteItemsItem) { } /** - * + * 待删除的配置项列表 * @return deleteItems */ - @Valid - @Schema(name = "deleteItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "deleteItems", description = "待删除的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("deleteItems") - public List<@Valid ItemDTO> getDeleteItems() { + public List<@Valid OpenItemDTO> getDeleteItems() { return deleteItems; } - public void setDeleteItems(List<@Valid ItemDTO> deleteItems) { + public void setDeleteItems(List<@Valid OpenItemDTO> deleteItems) { this.deleteItems = deleteItems; } @@ -259,16 +259,16 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ItemChangeSets itemChangeSets = (ItemChangeSets) o; - return Objects.equals(this.dataChangeCreatedBy, itemChangeSets.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, itemChangeSets.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, itemChangeSets.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, itemChangeSets.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, itemChangeSets.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, itemChangeSets.dataChangeLastModifiedTime) && - Objects.equals(this.createItems, itemChangeSets.createItems) && - Objects.equals(this.updateItems, itemChangeSets.updateItems) && - Objects.equals(this.deleteItems, itemChangeSets.deleteItems); + OpenItemChangeSets openItemChangeSets = (OpenItemChangeSets) o; + return Objects.equals(this.dataChangeCreatedBy, openItemChangeSets.dataChangeCreatedBy) && + Objects.equals(this.dataChangeLastModifiedBy, openItemChangeSets.dataChangeLastModifiedBy) && + Objects.equals(this.dataChangeCreatedByDisplayName, openItemChangeSets.dataChangeCreatedByDisplayName) && + Objects.equals(this.dataChangeLastModifiedByDisplayName, openItemChangeSets.dataChangeLastModifiedByDisplayName) && + Objects.equals(this.dataChangeCreatedTime, openItemChangeSets.dataChangeCreatedTime) && + Objects.equals(this.dataChangeLastModifiedTime, openItemChangeSets.dataChangeLastModifiedTime) && + Objects.equals(this.createItems, openItemChangeSets.createItems) && + Objects.equals(this.updateItems, openItemChangeSets.updateItems) && + Objects.equals(this.deleteItems, openItemChangeSets.deleteItems); } @Override @@ -279,7 +279,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ItemChangeSets {\n"); + sb.append("class OpenItemChangeSets {\n"); sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); @@ -304,4 +304,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java index 825828a..6311b19 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java @@ -20,7 +20,7 @@ */ @Schema(name = "OpenItemDTO", description = "Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenItemDTO { private @Nullable String dataChangeCreatedBy; @@ -48,7 +48,7 @@ public OpenItemDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { * 配置项创建者用户名,记录是谁创建了这个配置项 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "配置项创建者用户名,记录是谁创建了这个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -68,7 +68,7 @@ public OpenItemDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModif * 配置项最后修改者用户名,记录最后一次修改配置的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "配置项最后修改者用户名,记录最后一次修改配置的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -88,7 +88,7 @@ public OpenItemDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) * 配置项创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "配置项创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -108,7 +108,7 @@ public OpenItemDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastMod * 配置项最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "配置项最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -128,7 +128,7 @@ public OpenItemDTO key(@Nullable String key) { * 配置项的键名,在同一命名空间内唯一标识一个配置项 * @return key */ - + @Schema(name = "key", description = "配置项的键名,在同一命名空间内唯一标识一个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("key") public @Nullable String getKey() { @@ -148,7 +148,7 @@ public OpenItemDTO type(@Nullable Integer type) { * 配置项类型,0表示普通配置项,1表示文件类型配置项 * @return type */ - + @Schema(name = "type", description = "配置项类型,0表示普通配置项,1表示文件类型配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("type") public @Nullable Integer getType() { @@ -168,7 +168,7 @@ public OpenItemDTO value(@Nullable String value) { * 配置项的值,可以是字符串、数字、JSON等格式 * @return value */ - + @Schema(name = "value", description = "配置项的值,可以是字符串、数字、JSON等格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("value") public @Nullable String getValue() { @@ -188,7 +188,7 @@ public OpenItemDTO comment(@Nullable String comment) { * 配置项的注释说明,用于描述配置项的用途和含义 * @return comment */ - + @Schema(name = "comment", description = "配置项的注释说明,用于描述配置项的用途和含义", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") public @Nullable String getComment() { @@ -250,4 +250,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java similarity index 66% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java index 85e84a0..2e4b8f2 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListItemDiffs.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java @@ -2,8 +2,8 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ItemChangeSets; -import com.apollo.openapi.server.model.NamespaceIdentifier; +import com.apollo.openapi.server.model.OpenItemChangeSets; +import com.apollo.openapi.server.model.OpenNamespaceIdentifier; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.springframework.lang.Nullable; @@ -18,19 +18,19 @@ import javax.annotation.Generated; /** - * ListItemDiffs + * OpenItemDiffs */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListItemDiffs { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenItemDiffs { - private @Nullable NamespaceIdentifier namespace; + private @Nullable OpenNamespaceIdentifier namespace; - private @Nullable ItemChangeSets diffs; + private @Nullable OpenItemChangeSets diffs; private @Nullable String extInfo; - public ListItemDiffs namespace(@Nullable NamespaceIdentifier namespace) { + public OpenItemDiffs namespace(@Nullable OpenNamespaceIdentifier namespace) { this.namespace = namespace; return this; } @@ -39,18 +39,18 @@ public ListItemDiffs namespace(@Nullable NamespaceIdentifier namespace) { * Get namespace * @return namespace */ - @Valid + @Valid @Schema(name = "namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespace") - public @Nullable NamespaceIdentifier getNamespace() { + public @Nullable OpenNamespaceIdentifier getNamespace() { return namespace; } - public void setNamespace(@Nullable NamespaceIdentifier namespace) { + public void setNamespace(@Nullable OpenNamespaceIdentifier namespace) { this.namespace = namespace; } - public ListItemDiffs diffs(@Nullable ItemChangeSets diffs) { + public OpenItemDiffs diffs(@Nullable OpenItemChangeSets diffs) { this.diffs = diffs; return this; } @@ -59,28 +59,28 @@ public ListItemDiffs diffs(@Nullable ItemChangeSets diffs) { * Get diffs * @return diffs */ - @Valid + @Valid @Schema(name = "diffs", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("diffs") - public @Nullable ItemChangeSets getDiffs() { + public @Nullable OpenItemChangeSets getDiffs() { return diffs; } - public void setDiffs(@Nullable ItemChangeSets diffs) { + public void setDiffs(@Nullable OpenItemChangeSets diffs) { this.diffs = diffs; } - public ListItemDiffs extInfo(@Nullable String extInfo) { + public OpenItemDiffs extInfo(@Nullable String extInfo) { this.extInfo = extInfo; return this; } /** - * + * 扩展信息 * @return extInfo */ - - @Schema(name = "extInfo", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "extInfo", description = "扩展信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("extInfo") public @Nullable String getExtInfo() { return extInfo; @@ -98,10 +98,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListItemDiffs listItemDiffs = (ListItemDiffs) o; - return Objects.equals(this.namespace, listItemDiffs.namespace) && - Objects.equals(this.diffs, listItemDiffs.diffs) && - Objects.equals(this.extInfo, listItemDiffs.extInfo); + OpenItemDiffs openItemDiffs = (OpenItemDiffs) o; + return Objects.equals(this.namespace, openItemDiffs.namespace) && + Objects.equals(this.diffs, openItemDiffs.diffs) && + Objects.equals(this.extInfo, openItemDiffs.extInfo); } @Override @@ -112,7 +112,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListItemDiffs {\n"); + sb.append("class OpenItemDiffs {\n"); sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); sb.append(" diffs: ").append(toIndentedString(diffs)).append("\n"); sb.append(" extInfo: ").append(toIndentedString(extInfo)).append("\n"); @@ -131,4 +131,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java index b110593..d9b6154 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java @@ -24,7 +24,7 @@ */ @Schema(name = "OpenNamespaceDTO", description = "Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenNamespaceDTO { private @Nullable String dataChangeCreatedBy; @@ -59,7 +59,7 @@ public OpenNamespaceDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy * 命名空间创建者用户名,记录是谁创建了这个命名空间 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "命名空间创建者用户名,记录是谁创建了这个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -79,7 +79,7 @@ public OpenNamespaceDTO dataChangeLastModifiedBy(@Nullable String dataChangeLast * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -99,7 +99,7 @@ public OpenNamespaceDTO dataChangeCreatedTime(@Nullable String dataChangeCreated * 命名空间创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "命名空间创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -119,7 +119,7 @@ public OpenNamespaceDTO dataChangeLastModifiedTime(@Nullable String dataChangeLa * 命名空间最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "命名空间最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -139,7 +139,7 @@ public OpenNamespaceDTO appId(@Nullable String appId) { * 所属应用的唯一标识符 * @return appId */ - + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { @@ -159,7 +159,7 @@ public OpenNamespaceDTO clusterName(@Nullable String clusterName) { * 所属集群的名称 * @return clusterName */ - + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") public @Nullable String getClusterName() { @@ -179,7 +179,7 @@ public OpenNamespaceDTO namespaceName(@Nullable String namespaceName) { * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 * @return namespaceName */ - + @Schema(name = "namespaceName", description = "命名空间名称,在同一应用和集群下唯一标识一个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") public @Nullable String getNamespaceName() { @@ -199,7 +199,7 @@ public OpenNamespaceDTO comment(@Nullable String comment) { * 命名空间备注说明,描述命名空间的用途 * @return comment */ - + @Schema(name = "comment", description = "命名空间备注说明,描述命名空间的用途", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") public @Nullable String getComment() { @@ -219,7 +219,7 @@ public OpenNamespaceDTO format(@Nullable String format) { * 命名空间格式类型,如properties、xml、json、yml等 * @return format */ - + @Schema(name = "format", description = "命名空间格式类型,如properties、xml、json、yml等", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("format") public @Nullable String getFormat() { @@ -239,7 +239,7 @@ public OpenNamespaceDTO isPublic(@Nullable Boolean isPublic) { * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 * @return isPublic */ - + @Schema(name = "isPublic", description = "是否为公共命名空间,公共命名空间可以被其他应用关联使用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isPublic") public @Nullable Boolean getIsPublic() { @@ -267,7 +267,7 @@ public OpenNamespaceDTO addItemsItem(OpenItemDTO itemsItem) { * 命名空间包含的配置项列表 * @return items */ - @Valid + @Valid @Schema(name = "items", description = "命名空间包含的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("items") public List<@Valid OpenItemDTO> getItems() { @@ -335,4 +335,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java similarity index 67% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java index 567a787..b6434f1 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceIdentifier.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java @@ -16,11 +16,11 @@ import javax.annotation.Generated; /** - * NamespaceIdentifier + * OpenNamespaceIdentifier */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceIdentifier { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenNamespaceIdentifier { private @Nullable String appId; @@ -30,17 +30,17 @@ public class NamespaceIdentifier { private @Nullable String namespaceName; - public NamespaceIdentifier appId(@Nullable String appId) { + public OpenNamespaceIdentifier appId(@Nullable String appId) { this.appId = appId; return this; } /** - * + * 应用唯一标识 * @return appId */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "appId", description = "应用唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { return appId; @@ -50,17 +50,17 @@ public void setAppId(@Nullable String appId) { this.appId = appId; } - public NamespaceIdentifier env(@Nullable String env) { + public OpenNamespaceIdentifier env(@Nullable String env) { this.env = env; return this; } /** - * + * 环境标识 * @return env */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "env", description = "环境标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") public @Nullable String getEnv() { return env; @@ -70,17 +70,17 @@ public void setEnv(@Nullable String env) { this.env = env; } - public NamespaceIdentifier clusterName(@Nullable String clusterName) { + public OpenNamespaceIdentifier clusterName(@Nullable String clusterName) { this.clusterName = clusterName; return this; } /** - * + * 集群名称 * @return clusterName */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "clusterName", description = "集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") public @Nullable String getClusterName() { return clusterName; @@ -90,17 +90,17 @@ public void setClusterName(@Nullable String clusterName) { this.clusterName = clusterName; } - public NamespaceIdentifier namespaceName(@Nullable String namespaceName) { + public OpenNamespaceIdentifier namespaceName(@Nullable String namespaceName) { this.namespaceName = namespaceName; return this; } /** - * + * 命名空间名称 * @return namespaceName */ - - @Schema(name = "namespaceName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") public @Nullable String getNamespaceName() { return namespaceName; @@ -118,11 +118,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceIdentifier namespaceIdentifier = (NamespaceIdentifier) o; - return Objects.equals(this.appId, namespaceIdentifier.appId) && - Objects.equals(this.env, namespaceIdentifier.env) && - Objects.equals(this.clusterName, namespaceIdentifier.clusterName) && - Objects.equals(this.namespaceName, namespaceIdentifier.namespaceName); + OpenNamespaceIdentifier openNamespaceIdentifier = (OpenNamespaceIdentifier) o; + return Objects.equals(this.appId, openNamespaceIdentifier.appId) && + Objects.equals(this.env, openNamespaceIdentifier.env) && + Objects.equals(this.clusterName, openNamespaceIdentifier.clusterName) && + Objects.equals(this.namespaceName, openNamespaceIdentifier.namespaceName); } @Override @@ -133,7 +133,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceIdentifier {\n"); + sb.append("class OpenNamespaceIdentifier {\n"); sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); @@ -153,4 +153,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java index cbb263c..c256860 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java @@ -20,7 +20,7 @@ */ @Schema(name = "OpenNamespaceLockDTO", description = "Apollo命名空间锁状态数据传输对象") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenNamespaceLockDTO { private @Nullable String namespaceName; @@ -38,7 +38,7 @@ public OpenNamespaceLockDTO namespaceName(@Nullable String namespaceName) { * 命名空间名称 * @return namespaceName */ - + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") public @Nullable String getNamespaceName() { @@ -58,7 +58,7 @@ public OpenNamespaceLockDTO isLocked(@Nullable Boolean isLocked) { * 是否被锁定 * @return isLocked */ - + @Schema(name = "isLocked", description = "是否被锁定", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("isLocked") public @Nullable Boolean getIsLocked() { @@ -78,7 +78,7 @@ public OpenNamespaceLockDTO lockedBy(@Nullable String lockedBy) { * 锁定者用户名 * @return lockedBy */ - + @Schema(name = "lockedBy", description = "锁定者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("lockedBy") public @Nullable String getLockedBy() { @@ -130,4 +130,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java similarity index 57% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java index eab42b3..edef5d5 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceSyncModel.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java @@ -2,8 +2,8 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.ItemDTO; -import com.apollo.openapi.server.model.NamespaceIdentifier; +import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenNamespaceIdentifier; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; @@ -21,24 +21,24 @@ import javax.annotation.Generated; /** - * NamespaceSyncModel + * OpenNamespaceSyncModel */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceSyncModel { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenNamespaceSyncModel { @Valid - private List<@Valid NamespaceIdentifier> syncToNamespaces = new ArrayList<>(); + private List<@Valid OpenNamespaceIdentifier> syncToNamespaces = new ArrayList<>(); @Valid - private List<@Valid ItemDTO> syncItems = new ArrayList<>(); + private List<@Valid OpenItemDTO> syncItems = new ArrayList<>(); - public NamespaceSyncModel syncToNamespaces(List<@Valid NamespaceIdentifier> syncToNamespaces) { + public OpenNamespaceSyncModel syncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; return this; } - public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToNamespacesItem) { + public OpenNamespaceSyncModel addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { if (this.syncToNamespaces == null) { this.syncToNamespaces = new ArrayList<>(); } @@ -47,26 +47,26 @@ public NamespaceSyncModel addSyncToNamespacesItem(NamespaceIdentifier syncToName } /** - * + * 目标命名空间标识列表 * @return syncToNamespaces */ - @Valid - @Schema(name = "syncToNamespaces", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "syncToNamespaces", description = "目标命名空间标识列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("syncToNamespaces") - public List<@Valid NamespaceIdentifier> getSyncToNamespaces() { + public List<@Valid OpenNamespaceIdentifier> getSyncToNamespaces() { return syncToNamespaces; } - public void setSyncToNamespaces(List<@Valid NamespaceIdentifier> syncToNamespaces) { + public void setSyncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; } - public NamespaceSyncModel syncItems(List<@Valid ItemDTO> syncItems) { + public OpenNamespaceSyncModel syncItems(List<@Valid OpenItemDTO> syncItems) { this.syncItems = syncItems; return this; } - public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { + public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { if (this.syncItems == null) { this.syncItems = new ArrayList<>(); } @@ -75,17 +75,17 @@ public NamespaceSyncModel addSyncItemsItem(ItemDTO syncItemsItem) { } /** - * + * 需要同步的配置项列表 * @return syncItems */ - @Valid - @Schema(name = "syncItems", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "syncItems", description = "需要同步的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("syncItems") - public List<@Valid ItemDTO> getSyncItems() { + public List<@Valid OpenItemDTO> getSyncItems() { return syncItems; } - public void setSyncItems(List<@Valid ItemDTO> syncItems) { + public void setSyncItems(List<@Valid OpenItemDTO> syncItems) { this.syncItems = syncItems; } @@ -97,9 +97,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceSyncModel namespaceSyncModel = (NamespaceSyncModel) o; - return Objects.equals(this.syncToNamespaces, namespaceSyncModel.syncToNamespaces) && - Objects.equals(this.syncItems, namespaceSyncModel.syncItems); + OpenNamespaceSyncModel openNamespaceSyncModel = (OpenNamespaceSyncModel) o; + return Objects.equals(this.syncToNamespaces, openNamespaceSyncModel.syncToNamespaces) && + Objects.equals(this.syncItems, openNamespaceSyncModel.syncItems); } @Override @@ -110,7 +110,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceSyncModel {\n"); + sb.append("class OpenNamespaceSyncModel {\n"); sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); sb.append("}"); @@ -128,4 +128,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java similarity index 63% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java index 9f82c4d..949a112 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceTextModel.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java @@ -16,11 +16,11 @@ import javax.annotation.Generated; /** - * NamespaceTextModel + * OpenNamespaceTextModel */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class NamespaceTextModel { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenNamespaceTextModel { private @Nullable String appId; @@ -38,17 +38,17 @@ public class NamespaceTextModel { private @Nullable String operator; - public NamespaceTextModel appId(@Nullable String appId) { + public OpenNamespaceTextModel appId(@Nullable String appId) { this.appId = appId; return this; } /** - * + * 应用唯一标识 * @return appId */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "appId", description = "应用唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { return appId; @@ -58,17 +58,17 @@ public void setAppId(@Nullable String appId) { this.appId = appId; } - public NamespaceTextModel env(@Nullable String env) { + public OpenNamespaceTextModel env(@Nullable String env) { this.env = env; return this; } /** - * + * 环境标识 * @return env */ - - @Schema(name = "env", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "env", description = "环境标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("env") public @Nullable String getEnv() { return env; @@ -78,17 +78,17 @@ public void setEnv(@Nullable String env) { this.env = env; } - public NamespaceTextModel clusterName(@Nullable String clusterName) { + public OpenNamespaceTextModel clusterName(@Nullable String clusterName) { this.clusterName = clusterName; return this; } /** - * + * 集群名称 * @return clusterName */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "clusterName", description = "集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") public @Nullable String getClusterName() { return clusterName; @@ -98,17 +98,17 @@ public void setClusterName(@Nullable String clusterName) { this.clusterName = clusterName; } - public NamespaceTextModel namespaceName(@Nullable String namespaceName) { + public OpenNamespaceTextModel namespaceName(@Nullable String namespaceName) { this.namespaceName = namespaceName; return this; } /** - * + * 命名空间名称 * @return namespaceName */ - - @Schema(name = "namespaceName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") public @Nullable String getNamespaceName() { return namespaceName; @@ -118,17 +118,17 @@ public void setNamespaceName(@Nullable String namespaceName) { this.namespaceName = namespaceName; } - public NamespaceTextModel namespaceId(@Nullable Long namespaceId) { + public OpenNamespaceTextModel namespaceId(@Nullable Long namespaceId) { this.namespaceId = namespaceId; return this; } /** - * + * 命名空间ID * @return namespaceId */ - - @Schema(name = "namespaceId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "namespaceId", description = "命名空间ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceId") public @Nullable Long getNamespaceId() { return namespaceId; @@ -138,17 +138,17 @@ public void setNamespaceId(@Nullable Long namespaceId) { this.namespaceId = namespaceId; } - public NamespaceTextModel format(@Nullable String format) { + public OpenNamespaceTextModel format(@Nullable String format) { this.format = format; return this; } /** - * + * 命名空间格式类型(properties/xml/json/yml等) * @return format */ - - @Schema(name = "format", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "format", description = "命名空间格式类型(properties/xml/json/yml等)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("format") public @Nullable String getFormat() { return format; @@ -158,17 +158,17 @@ public void setFormat(@Nullable String format) { this.format = format; } - public NamespaceTextModel configText(@Nullable String configText) { + public OpenNamespaceTextModel configText(@Nullable String configText) { this.configText = configText; return this; } /** - * + * 配置内容的原始文本 * @return configText */ - - @Schema(name = "configText", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "configText", description = "配置内容的原始文本", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("configText") public @Nullable String getConfigText() { return configText; @@ -178,17 +178,17 @@ public void setConfigText(@Nullable String configText) { this.configText = configText; } - public NamespaceTextModel operator(@Nullable String operator) { + public OpenNamespaceTextModel operator(@Nullable String operator) { this.operator = operator; return this; } /** - * + * 操作者用户名 * @return operator */ - - @Schema(name = "operator", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "operator", description = "操作者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("operator") public @Nullable String getOperator() { return operator; @@ -206,15 +206,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - NamespaceTextModel namespaceTextModel = (NamespaceTextModel) o; - return Objects.equals(this.appId, namespaceTextModel.appId) && - Objects.equals(this.env, namespaceTextModel.env) && - Objects.equals(this.clusterName, namespaceTextModel.clusterName) && - Objects.equals(this.namespaceName, namespaceTextModel.namespaceName) && - Objects.equals(this.namespaceId, namespaceTextModel.namespaceId) && - Objects.equals(this.format, namespaceTextModel.format) && - Objects.equals(this.configText, namespaceTextModel.configText) && - Objects.equals(this.operator, namespaceTextModel.operator); + OpenNamespaceTextModel openNamespaceTextModel = (OpenNamespaceTextModel) o; + return Objects.equals(this.appId, openNamespaceTextModel.appId) && + Objects.equals(this.env, openNamespaceTextModel.env) && + Objects.equals(this.clusterName, openNamespaceTextModel.clusterName) && + Objects.equals(this.namespaceName, openNamespaceTextModel.namespaceName) && + Objects.equals(this.namespaceId, openNamespaceTextModel.namespaceId) && + Objects.equals(this.format, openNamespaceTextModel.format) && + Objects.equals(this.configText, openNamespaceTextModel.configText) && + Objects.equals(this.operator, openNamespaceTextModel.operator); } @Override @@ -225,7 +225,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceTextModel {\n"); + sb.append("class OpenNamespaceTextModel {\n"); sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); @@ -249,4 +249,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java index 893c574..5e1bcf5 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java @@ -19,7 +19,7 @@ * OpenOrganizationDto */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenOrganizationDto { private @Nullable String orgId; @@ -32,11 +32,11 @@ public OpenOrganizationDto orgId(@Nullable String orgId) { } /** - * + * 组织ID * @return orgId */ - - @Schema(name = "orgId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "orgId", description = "组织ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgId") public @Nullable String getOrgId() { return orgId; @@ -52,11 +52,11 @@ public OpenOrganizationDto orgName(@Nullable String orgName) { } /** - * + * 组织名称 * @return orgName */ - - @Schema(name = "orgName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @Schema(name = "orgName", description = "组织名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("orgName") public @Nullable String getOrgName() { return orgName; @@ -105,4 +105,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java index e0f3a30..c345f20 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java @@ -24,7 +24,7 @@ */ @Schema(name = "OpenPageDTOOpenInstanceDTO", description = "分页实例数据传输对象,用于返回分页查询的实例列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenPageDTOOpenInstanceDTO { private @Nullable Integer page; @@ -45,7 +45,7 @@ public OpenPageDTOOpenInstanceDTO page(@Nullable Integer page) { * 当前页码,从0开始计数 * @return page */ - + @Schema(name = "page", description = "当前页码,从0开始计数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("page") public @Nullable Integer getPage() { @@ -65,7 +65,7 @@ public OpenPageDTOOpenInstanceDTO size(@Nullable Integer size) { * 每页显示的记录数量 * @return size */ - + @Schema(name = "size", description = "每页显示的记录数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("size") public @Nullable Integer getSize() { @@ -85,7 +85,7 @@ public OpenPageDTOOpenInstanceDTO total(@Nullable Long total) { * 总记录数,符合查询条件的实例总数量 * @return total */ - + @Schema(name = "total", description = "总记录数,符合查询条件的实例总数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("total") public @Nullable Long getTotal() { @@ -113,7 +113,7 @@ public OpenPageDTOOpenInstanceDTO addContentItem(OpenInstanceDTO contentItem) { * 当前页的实例列表,包含具体的实例数据 * @return content */ - @Valid + @Valid @Schema(name = "content", description = "当前页的实例列表,包含具体的实例数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("content") public List<@Valid OpenInstanceDTO> getContent() { @@ -167,4 +167,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java index 4241a01..d572039 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java @@ -24,7 +24,7 @@ */ @Schema(name = "OpenPageDTOOpenItemDTO", description = "分页配置项数据传输对象,用于返回分页查询的配置项列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenPageDTOOpenItemDTO { private @Nullable Integer page; @@ -45,7 +45,7 @@ public OpenPageDTOOpenItemDTO page(@Nullable Integer page) { * 当前页码,从0开始计数 * @return page */ - + @Schema(name = "page", description = "当前页码,从0开始计数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("page") public @Nullable Integer getPage() { @@ -65,7 +65,7 @@ public OpenPageDTOOpenItemDTO size(@Nullable Integer size) { * 每页显示的记录数量 * @return size */ - + @Schema(name = "size", description = "每页显示的记录数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("size") public @Nullable Integer getSize() { @@ -85,7 +85,7 @@ public OpenPageDTOOpenItemDTO total(@Nullable Long total) { * 总记录数,符合查询条件的配置项总数量 * @return total */ - + @Schema(name = "total", description = "总记录数,符合查询条件的配置项总数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("total") public @Nullable Long getTotal() { @@ -113,7 +113,7 @@ public OpenPageDTOOpenItemDTO addContentItem(OpenItemDTO contentItem) { * 当前页的配置项列表,包含具体的配置项数据 * @return content */ - @Valid + @Valid @Schema(name = "content", description = "当前页的配置项列表,包含具体的配置项数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("content") public List<@Valid OpenItemDTO> getContent() { @@ -167,4 +167,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java similarity index 73% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java index 0ea08c0..c89305d 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ListReleaseBO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java @@ -3,7 +3,7 @@ import java.net.URI; import java.util.Objects; import com.apollo.openapi.server.model.KVEntity; -import com.apollo.openapi.server.model.ReleaseDTO; +import com.apollo.openapi.server.model.OpenReleaseDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; @@ -21,18 +21,18 @@ import javax.annotation.Generated; /** - * ListReleaseBO + * OpenReleaseBO */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ListReleaseBO { +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +public class OpenReleaseBO { - private @Nullable ReleaseDTO baseInfo; + private @Nullable OpenReleaseDTO baseInfo; @Valid private List<@Valid KVEntity> items = new ArrayList<>(); - public ListReleaseBO baseInfo(@Nullable ReleaseDTO baseInfo) { + public OpenReleaseBO baseInfo(@Nullable OpenReleaseDTO baseInfo) { this.baseInfo = baseInfo; return this; } @@ -41,23 +41,23 @@ public ListReleaseBO baseInfo(@Nullable ReleaseDTO baseInfo) { * Get baseInfo * @return baseInfo */ - @Valid + @Valid @Schema(name = "baseInfo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("baseInfo") - public @Nullable ReleaseDTO getBaseInfo() { + public @Nullable OpenReleaseDTO getBaseInfo() { return baseInfo; } - public void setBaseInfo(@Nullable ReleaseDTO baseInfo) { + public void setBaseInfo(@Nullable OpenReleaseDTO baseInfo) { this.baseInfo = baseInfo; } - public ListReleaseBO items(List<@Valid KVEntity> items) { + public OpenReleaseBO items(List<@Valid KVEntity> items) { this.items = items; return this; } - public ListReleaseBO addItemsItem(KVEntity itemsItem) { + public OpenReleaseBO addItemsItem(KVEntity itemsItem) { if (this.items == null) { this.items = new ArrayList<>(); } @@ -66,11 +66,11 @@ public ListReleaseBO addItemsItem(KVEntity itemsItem) { } /** - * + * Get items * @return items */ - @Valid - @Schema(name = "items", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Valid + @Schema(name = "items", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("items") public List<@Valid KVEntity> getItems() { return items; @@ -88,9 +88,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ListReleaseBO listReleaseBO = (ListReleaseBO) o; - return Objects.equals(this.baseInfo, listReleaseBO.baseInfo) && - Objects.equals(this.items, listReleaseBO.items); + OpenReleaseBO openReleaseBO = (OpenReleaseBO) o; + return Objects.equals(this.baseInfo, openReleaseBO.baseInfo) && + Objects.equals(this.items, openReleaseBO.items); } @Override @@ -101,7 +101,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ListReleaseBO {\n"); + sb.append("class OpenReleaseBO {\n"); sb.append(" baseInfo: ").append(toIndentedString(baseInfo)).append("\n"); sb.append(" items: ").append(toIndentedString(items)).append("\n"); sb.append("}"); @@ -119,4 +119,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java index 78527ae..76f1544 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java @@ -2,9 +2,10 @@ import java.net.URI; import java.util.Objects; -import com.apollo.openapi.server.model.MapString; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.HashMap; +import java.util.Map; import org.springframework.lang.Nullable; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; @@ -21,7 +22,7 @@ */ @Schema(name = "OpenReleaseDTO", description = "Apollo发布信息数据传输对象,表示一次配置发布的完整信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenReleaseDTO { private @Nullable String dataChangeCreatedBy; @@ -42,7 +43,8 @@ public class OpenReleaseDTO { private @Nullable String name; - private @Nullable MapString configurations; + @Valid + private Map configurations = new HashMap<>(); private @Nullable String comment; @@ -55,7 +57,7 @@ public OpenReleaseDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) * 发布创建者用户名,记录是谁创建了这次发布 * @return dataChangeCreatedBy */ - + @Schema(name = "dataChangeCreatedBy", description = "发布创建者用户名,记录是谁创建了这次发布", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedBy") public @Nullable String getDataChangeCreatedBy() { @@ -75,7 +77,7 @@ public OpenReleaseDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastMo * 发布最后修改者用户名,记录最后一次修改发布信息的用户 * @return dataChangeLastModifiedBy */ - + @Schema(name = "dataChangeLastModifiedBy", description = "发布最后修改者用户名,记录最后一次修改发布信息的用户", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedBy") public @Nullable String getDataChangeLastModifiedBy() { @@ -95,7 +97,7 @@ public OpenReleaseDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTi * 发布创建时间,ISO 8601格式的时间戳 * @return dataChangeCreatedTime */ - + @Schema(name = "dataChangeCreatedTime", description = "发布创建时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeCreatedTime") public @Nullable String getDataChangeCreatedTime() { @@ -115,7 +117,7 @@ public OpenReleaseDTO dataChangeLastModifiedTime(@Nullable String dataChangeLast * 发布最后修改时间,ISO 8601格式的时间戳 * @return dataChangeLastModifiedTime */ - + @Schema(name = "dataChangeLastModifiedTime", description = "发布最后修改时间,ISO 8601格式的时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("dataChangeLastModifiedTime") public @Nullable String getDataChangeLastModifiedTime() { @@ -135,7 +137,7 @@ public OpenReleaseDTO id(@Nullable Long id) { * 发布记录的唯一标识符,系统自动生成 * @return id */ - + @Schema(name = "id", description = "发布记录的唯一标识符,系统自动生成", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("id") public @Nullable Long getId() { @@ -155,7 +157,7 @@ public OpenReleaseDTO appId(@Nullable String appId) { * 所属应用的唯一标识符 * @return appId */ - + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("appId") public @Nullable String getAppId() { @@ -175,7 +177,7 @@ public OpenReleaseDTO clusterName(@Nullable String clusterName) { * 所属集群的名称 * @return clusterName */ - + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clusterName") public @Nullable String getClusterName() { @@ -195,7 +197,7 @@ public OpenReleaseDTO namespaceName(@Nullable String namespaceName) { * 所属命名空间的名称 * @return namespaceName */ - + @Schema(name = "namespaceName", description = "所属命名空间的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("namespaceName") public @Nullable String getNamespaceName() { @@ -215,7 +217,7 @@ public OpenReleaseDTO name(@Nullable String name) { * 发布名称,用于标识这次发布的版本或描述 * @return name */ - + @Schema(name = "name", description = "发布名称,用于标识这次发布的版本或描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("name") public @Nullable String getName() { @@ -226,23 +228,31 @@ public void setName(@Nullable String name) { this.name = name; } - public OpenReleaseDTO configurations(@Nullable MapString configurations) { + public OpenReleaseDTO configurations(Map configurations) { this.configurations = configurations; return this; } + public OpenReleaseDTO putConfigurationsItem(String key, String configurationsItem) { + if (this.configurations == null) { + this.configurations = new HashMap<>(); + } + this.configurations.put(key, configurationsItem); + return this; + } + /** * Get configurations * @return configurations */ - @Valid + @Schema(name = "configurations", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("configurations") - public @Nullable MapString getConfigurations() { + public Map getConfigurations() { return configurations; } - public void setConfigurations(@Nullable MapString configurations) { + public void setConfigurations(Map configurations) { this.configurations = configurations; } @@ -255,7 +265,7 @@ public OpenReleaseDTO comment(@Nullable String comment) { * 发布备注,描述本次发布的变更内容和目的 * @return comment */ - + @Schema(name = "comment", description = "发布备注,描述本次发布的变更内容和目的", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("comment") public @Nullable String getComment() { @@ -323,4 +333,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java index 33342b2..97d8ad4 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsGet401Response.java @@ -21,7 +21,7 @@ */ @JsonTypeName("_openapi_v1_apps_get_401_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenapiV1AppsGet401Response { private @Nullable String message; @@ -35,7 +35,7 @@ public OpenapiV1AppsGet401Response message(@Nullable String message) { * Get message * @return message */ - + @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public @Nullable String getMessage() { @@ -83,4 +83,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java index 7f72276..dd10f8d 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPost400Response.java @@ -21,7 +21,7 @@ */ @JsonTypeName("_openapi_v1_apps_post_400_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenapiV1AppsPost400Response { private @Nullable String message; @@ -37,7 +37,7 @@ public OpenapiV1AppsPost400Response message(@Nullable String message) { * Get message * @return message */ - + @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("message") public @Nullable String getMessage() { @@ -57,7 +57,7 @@ public OpenapiV1AppsPost400Response exception(@Nullable String exception) { * Get exception * @return exception */ - + @Schema(name = "exception", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("exception") public @Nullable String getException() { @@ -107,4 +107,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java index 1f9d264..a1dc2fc 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1AppsPostRequest.java @@ -21,12 +21,12 @@ import javax.annotation.Generated; /** - * + * 创建应用请求体,包含应用基本信息与管理员设置 */ -@Schema(name = "_openapi_v1_apps_post_request", description = "") +@Schema(name = "_openapi_v1_apps_post_request", description = "创建应用请求体,包含应用基本信息与管理员设置") @JsonTypeName("_openapi_v1_apps_post_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-25T00:40:29.983824+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") public class OpenapiV1AppsPostRequest { private OpenAppDTO app; @@ -58,7 +58,7 @@ public OpenapiV1AppsPostRequest app(OpenAppDTO app) { * Get app * @return app */ - @NotNull @Valid + @NotNull @Valid @Schema(name = "app", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("app") public OpenAppDTO getApp() { @@ -78,7 +78,7 @@ public OpenapiV1AppsPostRequest assignAppRoleToSelf(Boolean assignAppRoleToSelf) * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 * @return assignAppRoleToSelf */ - @NotNull + @NotNull @Schema(name = "assignAppRoleToSelf", description = "是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("assignAppRoleToSelf") public Boolean getAssignAppRoleToSelf() { @@ -106,7 +106,7 @@ public OpenapiV1AppsPostRequest addAdminsItem(String adminsItem) { * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 * @return admins */ - @NotNull + @NotNull @Schema(name = "admins", description = "应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限", requiredMode = Schema.RequiredMode.REQUIRED) @JsonProperty("admins") public List getAdmins() { @@ -158,4 +158,3 @@ private String toIndentedString(Object o) { return o.toString().replace("\n", "\n "); } } - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java deleted file mode 100644 index 6551ff3..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - -@JsonTypeName("_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - - private @Nullable Boolean valid; - - private @Nullable String message; - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response valid(@Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - - @Schema(name = "valid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("valid") - public @Nullable Boolean getValid() { - return valid; - } - - public void setValid(@Nullable Boolean valid) { - this.valid = valid; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.message); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java deleted file mode 100644 index fdca2f0..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - -@JsonTypeName("_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - - private @Nullable Boolean valid; - - private @Nullable String message; - - @Valid - private List errors = new ArrayList<>(); - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response valid(@Nullable Boolean valid) { - this.valid = valid; - return this; - } - - /** - * Get valid - * @return valid - */ - - @Schema(name = "valid", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("valid") - public @Nullable Boolean getValid() { - return valid; - } - - public void setValid(@Nullable Boolean valid) { - this.valid = valid; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response message(@Nullable String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public @Nullable String getMessage() { - return message; - } - - public void setMessage(@Nullable String message) { - this.message = message; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response errors(List errors) { - this.errors = errors; - return this; - } - - public OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response addErrorsItem(String errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - return this; - } - - /** - * Get errors - * @return errors - */ - - @Schema(name = "errors", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("errors") - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response = (OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response) o; - return Objects.equals(this.valid, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.valid) && - Objects.equals(this.message, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.message) && - Objects.equals(this.errors, openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.errors); - } - - @Override - public int hashCode() { - return Objects.hash(valid, message, errors); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response {\n"); - sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java deleted file mode 100644 index bafb4a5..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenapiV1EnvsEnvReleasesCompareGet200Response.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.Change; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - -@JsonTypeName("_openapi_v1_envs__env__releases_compare_get_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class OpenapiV1EnvsEnvReleasesCompareGet200Response { - - @Valid - private List<@Valid Change> changes = new ArrayList<>(); - - public OpenapiV1EnvsEnvReleasesCompareGet200Response changes(List<@Valid Change> changes) { - this.changes = changes; - return this; - } - - public OpenapiV1EnvsEnvReleasesCompareGet200Response addChangesItem(Change changesItem) { - if (this.changes == null) { - this.changes = new ArrayList<>(); - } - this.changes.add(changesItem); - return this; - } - - /** - * Get changes - * @return changes - */ - @Valid - @Schema(name = "changes", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("changes") - public List<@Valid Change> getChanges() { - return changes; - } - - public void setChanges(List<@Valid Change> changes) { - this.changes = changes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenapiV1EnvsEnvReleasesCompareGet200Response openapiV1EnvsEnvReleasesCompareGet200Response = (OpenapiV1EnvsEnvReleasesCompareGet200Response) o; - return Objects.equals(this.changes, openapiV1EnvsEnvReleasesCompareGet200Response.changes); - } - - @Override - public int hashCode() { - return Objects.hash(changes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenapiV1EnvsEnvReleasesCompareGet200Response {\n"); - sb.append(" changes: ").append(toIndentedString(changes)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java deleted file mode 100644 index b4c2dc4..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ReleaseDTO.java +++ /dev/null @@ -1,420 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.springframework.lang.Nullable; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ReleaseDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-09-14T17:08:21.606545+08:00[Asia/Shanghai]", comments = "Generator version: 7.15.0") -public class ReleaseDTO { - - private @Nullable String dataChangeCreatedBy; - - private @Nullable String dataChangeLastModifiedBy; - - private @Nullable String dataChangeCreatedByDisplayName; - - private @Nullable String dataChangeLastModifiedByDisplayName; - - private @Nullable String dataChangeCreatedTime; - - private @Nullable String dataChangeLastModifiedTime; - - private @Nullable Long id; - - private @Nullable String releaseKey; - - private @Nullable String name; - - private @Nullable String appId; - - private @Nullable String clusterName; - - private @Nullable String namespaceName; - - private @Nullable String configurations; - - private @Nullable String comment; - - private @Nullable Boolean isAbandoned; - - public ReleaseDTO dataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - */ - - @Schema(name = "dataChangeCreatedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedBy") - public @Nullable String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - public void setDataChangeCreatedBy(@Nullable String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - public ReleaseDTO dataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - */ - - @Schema(name = "dataChangeLastModifiedBy", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedBy") - public @Nullable String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - public void setDataChangeLastModifiedBy(@Nullable String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - public ReleaseDTO dataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - */ - - @Schema(name = "dataChangeCreatedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedByDisplayName") - public @Nullable String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - public void setDataChangeCreatedByDisplayName(@Nullable String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - public ReleaseDTO dataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - */ - - @Schema(name = "dataChangeLastModifiedByDisplayName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedByDisplayName") - public @Nullable String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - public void setDataChangeLastModifiedByDisplayName(@Nullable String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - public ReleaseDTO dataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public @Nullable String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(@Nullable String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public ReleaseDTO dataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public @Nullable String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(@Nullable String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public ReleaseDTO id(@Nullable Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public @Nullable Long getId() { - return id; - } - - public void setId(@Nullable Long id) { - this.id = id; - } - - public ReleaseDTO releaseKey(@Nullable String releaseKey) { - this.releaseKey = releaseKey; - return this; - } - - /** - * - * @return releaseKey - */ - - @Schema(name = "releaseKey", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseKey") - public @Nullable String getReleaseKey() { - return releaseKey; - } - - public void setReleaseKey(@Nullable String releaseKey) { - this.releaseKey = releaseKey; - } - - public ReleaseDTO name(@Nullable String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - - @Schema(name = "name", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public @Nullable String getName() { - return name; - } - - public void setName(@Nullable String name) { - this.name = name; - } - - public ReleaseDTO appId(@Nullable String appId) { - this.appId = appId; - return this; - } - - /** - * - * @return appId - */ - - @Schema(name = "appId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public @Nullable String getAppId() { - return appId; - } - - public void setAppId(@Nullable String appId) { - this.appId = appId; - } - - public ReleaseDTO clusterName(@Nullable String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * - * @return clusterName - */ - - @Schema(name = "clusterName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusterName") - public @Nullable String getClusterName() { - return clusterName; - } - - public void setClusterName(@Nullable String clusterName) { - this.clusterName = clusterName; - } - - public ReleaseDTO namespaceName(@Nullable String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - */ - - @Schema(name = "namespaceName", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceName") - public @Nullable String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(@Nullable String namespaceName) { - this.namespaceName = namespaceName; - } - - public ReleaseDTO configurations(@Nullable String configurations) { - this.configurations = configurations; - return this; - } - - /** - * - * @return configurations - */ - - @Schema(name = "configurations", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("configurations") - public @Nullable String getConfigurations() { - return configurations; - } - - public void setConfigurations(@Nullable String configurations) { - this.configurations = configurations; - } - - public ReleaseDTO comment(@Nullable String comment) { - this.comment = comment; - return this; - } - - /** - * - * @return comment - */ - - @Schema(name = "comment", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public @Nullable String getComment() { - return comment; - } - - public void setComment(@Nullable String comment) { - this.comment = comment; - } - - public ReleaseDTO isAbandoned(@Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - return this; - } - - /** - * - * @return isAbandoned - */ - - @Schema(name = "isAbandoned", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isAbandoned") - public @Nullable Boolean getIsAbandoned() { - return isAbandoned; - } - - public void setIsAbandoned(@Nullable Boolean isAbandoned) { - this.isAbandoned = isAbandoned; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ReleaseDTO releaseDTO = (ReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, releaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, releaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, releaseDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, releaseDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, releaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, releaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, releaseDTO.id) && - Objects.equals(this.releaseKey, releaseDTO.releaseKey) && - Objects.equals(this.name, releaseDTO.name) && - Objects.equals(this.appId, releaseDTO.appId) && - Objects.equals(this.clusterName, releaseDTO.clusterName) && - Objects.equals(this.namespaceName, releaseDTO.namespaceName) && - Objects.equals(this.configurations, releaseDTO.configurations) && - Objects.equals(this.comment, releaseDTO.comment) && - Objects.equals(this.isAbandoned, releaseDTO.isAbandoned); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, releaseKey, name, appId, clusterName, namespaceName, configurations, comment, isAbandoned); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedByDisplayName: ").append(toIndentedString(dataChangeLastModifiedByDisplayName)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" releaseKey: ").append(toIndentedString(releaseKey)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" isAbandoned: ").append(toIndentedString(isAbandoned)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} - diff --git a/spring-boot2/src/main/resources/openapi.yaml b/spring-boot2/src/main/resources/openapi.yaml index 4efa588..7fcfeb4 100644 --- a/spring-boot2/src/main/resources/openapi.yaml +++ b/spring-boot2/src/main/resources/openapi.yaml @@ -1,34 +1,21 @@ openapi: 3.0.1 info: description: | - Apollo配置中心OpenAPI接口文档 +

Apollo配置中心OpenAPI接口文档

- ## 认证方式 +

认证方式

+

所有 API 接口都需要通过 Authorization header 进行身份验证。

- 所有API接口都需要通过Authorization header进行身份验证。 +

获取 Token 的方式:

+
    +
  1. Portal 管理界面获取:登录 Portal → 管理员工具 → 开放平台授权管理 → 创建第三方应用,获取 Token。
  2. +
  3. Token 格式Authorization: token_value
  4. +
  5. Token 权限:按应用/环境/命名空间授予,建议不同用途分别创建。
  6. +
- ### 获取Token的方式: - - 1. **Portal管理界面获取**: - - 登录Apollo Portal管理界面 - - 进入"管理员工具" -> "开放平台授权管理" - - 创建第三方应用,获取Token - - 2. **Token格式**: - ``` - Authorization: token_value - ``` - - 3. **Token权限**: - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - - ### 使用示例: - ```bash - curl -X GET "http://localhost:8070/openapi/v1/apps" \ - -H "Authorization: your_token_here" - ``` +

使用示例

+
curl -X GET "http://localhost:8070/openapi/v1/apps" \
+    -H "Authorization: your_token_here"
title: Apollo OpenAPI version: 1.0.0 servers: @@ -56,7 +43,7 @@ paths: /openapi/v1/apps: get: deprecated: false - description: GET /openapi/v1/apps?authorized=true + description: GET /openapi/v1/apps/authorized parameters: - description: 是否只返回授权的应用 example: "true" @@ -164,12 +151,12 @@ paths: - application/json x-tags: - tag: App Management - /openapi/v1/apps/{appId}/env-clusters: + /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/env-clusters" + description: "GET /openapi/v1/apps/{appId}/envclusters" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -218,7 +205,7 @@ paths: deprecated: false description: "DELETE /openapi/v1/apps/{appId}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -262,7 +249,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -307,7 +294,7 @@ paths: deprecated: false description: "PUT /openapi/v1/apps/{appId}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -321,7 +308,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/OpenAppDTO" - description: "" + description: 更新应用请求体 required: - appId - name @@ -347,7 +334,7 @@ paths: ownerEmail: admin@apollo.com schema: $ref: "#/components/schemas/OpenAppDTO" - description: "" + description: 应用更新成功 "400": content: application/json: @@ -426,7 +413,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}/navtree" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -454,7 +441,7 @@ paths: comment: Default cluster schema: items: - $ref: "#/components/schemas/EnvClusterInfo" + $ref: "#/components/schemas/OpenEnvClusterInfo" type: array description: 成功获取应用导航树 summary: 获取应用导航树 @@ -469,7 +456,7 @@ paths: deprecated: false description: "POST /openapi/v1/apps/envs/{env}" parameters: - - description: "" + - description: 环境标识,例如 DEV、FAT、UAT、PROD explode: false in: path name: env @@ -483,7 +470,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/OpenAppDTO" - description: "" + description: 在指定环境创建应用的请求体 required: - appId - name @@ -530,7 +517,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}/miss_envs" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -565,12 +552,12 @@ paths: - application/json x-tags: - tag: App Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: delete: deprecated: false - description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -578,7 +565,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -586,7 +573,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -594,7 +581,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -602,7 +589,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名 explode: false in: path name: key @@ -610,11 +597,11 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -625,7 +612,7 @@ paths: schema: properties: {} type: object - description: "" + description: 配置项删除成功 summary: 删除配置项 tags: - Item Management @@ -635,9 +622,9 @@ paths: - tag: Item Management get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -645,7 +632,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -653,7 +640,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -661,7 +648,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -669,7 +656,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名 explode: false in: path name: key @@ -710,7 +697,7 @@ paths: - tag: Item Management put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + description: "PUT /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" parameters: - description: "" explode: false @@ -720,7 +707,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -728,7 +715,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -736,7 +723,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -816,12 +803,12 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items: get: deprecated: false - description: "" + description: 获取指定命名空间的配置项列表,支持分页 parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -829,7 +816,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -837,7 +824,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -845,7 +832,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -853,7 +840,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -862,7 +849,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 50 explode: true in: query @@ -924,9 +911,9 @@ paths: - tag: Item Management post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -934,7 +921,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -942,7 +929,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -950,7 +937,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -964,7 +951,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/OpenItemDTO" - description: "" + description: 创建配置项请求体 required: - dataChangeCreatedBy - key @@ -1011,7 +998,7 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: delete: deprecated: false description: "DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" @@ -1060,7 +1047,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -1081,9 +1068,9 @@ paths: - tag: Item Management get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false}" + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1091,7 +1078,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1099,7 +1086,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1107,7 +1094,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1115,7 +1102,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名(需要URL编码) explode: false in: path name: key @@ -1158,7 +1145,7 @@ paths: deprecated: false description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1166,7 +1153,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1174,7 +1161,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1182,7 +1169,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1190,7 +1177,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 配置项键名(需要URL编码) explode: false in: path name: key @@ -1198,7 +1185,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 若不存在则创建(true/false) example: "false" explode: true in: query @@ -1213,7 +1200,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/OpenItemDTO" - description: "" + description: 更新配置项请求体(编码key) required: - dataChangeLastModifiedBy - key @@ -1262,10 +1249,10 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate: put: deprecated: false - description: "PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate" parameters: - description: "" explode: false @@ -1304,12 +1291,11 @@ paths: application/json: schema: allOf: - - $ref: "#/components/schemas/NamespaceTextModel" - description: "" + - $ref: "#/components/schemas/OpenNamespaceTextModel" + description: 批量更新配置文本请求体 required: - configText - format - - operator type: object required: true responses: @@ -1321,14 +1307,6 @@ paths: schema: $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" description: 批量更新配置项成功 - "400": - content: - application/json: - example: - message: operator should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 "403": content: application/json: @@ -1345,12 +1323,12 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: deprecated: false - description: "GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1358,7 +1336,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1366,7 +1344,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1374,7 +1352,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1382,7 +1360,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -1431,12 +1409,12 @@ paths: - application/json x-tags: - tag: Namespace Branch Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare: + /openapi/v1/namespaces/items:compare: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare" + description: POST /openapi/v1/namespaces/items:compare parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1444,7 +1422,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1452,7 +1430,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1460,7 +1438,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1473,8 +1451,8 @@ paths: application/json: schema: allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" + - $ref: "#/components/schemas/OpenNamespaceSyncModel" + description: 对比配置差异请求体 required: - syncItems - syncToNamespaces @@ -1542,7 +1520,7 @@ paths: extInfo: "" schema: items: - $ref: "#/components/schemas/ListItemDiffs" + $ref: "#/components/schemas/OpenItemDiffs" type: array description: 成功对比命名空间配置差异 summary: 对比命名空间配置差异 @@ -1553,12 +1531,12 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync: + /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync" + description: "POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/items:sync" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1566,7 +1544,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1574,15 +1552,7 @@ paths: schema: type: string style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -1595,8 +1565,8 @@ paths: application/json: schema: allOf: - - $ref: "#/components/schemas/NamespaceSyncModel" - description: "" + - $ref: "#/components/schemas/OpenNamespaceSyncModel" + description: 同步配置项请求体 required: - syncItems - syncToNamespaces @@ -1635,10 +1605,11 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: + /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" + description: "POST /openapi/apps/{appId}/env/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate" + operationId: validateItems parameters: - description: "" explode: false @@ -1677,7 +1648,7 @@ paths: application/json: schema: allOf: - - $ref: "#/components/schemas/NamespaceTextModel" + - $ref: "#/components/schemas/OpenNamespaceTextModel" description: "" required: - configText @@ -1689,22 +1660,17 @@ paths: content: application/json: example: - valid: true message: Configuration syntax is valid schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response" + $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" description: 配置文本语法验证通过 "400": content: application/json: example: - valid: false message: Configuration syntax validation failed - errors: - - "Line 3: Invalid property format" - - "Line 7: Missing value for key \"database.port\"" schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response" + $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" description: 配置文本语法错误 summary: 验证配置文本语法 tags: @@ -1714,10 +1680,10 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" + description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert" parameters: - description: "" explode: false @@ -1783,11 +1749,19 @@ paths: - application/json x-tags: - tag: Item Management - /openapi/v1/apps/{appId}/clusters/{clusterName}: - get: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: + delete: deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}" + description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" parameters: + - description: "" + explode: false + in: path + name: env + required: true + schema: + type: string + style: simple - description: "" explode: false in: path @@ -1809,15 +1783,26 @@ paths: content: application/json: example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - name: production - appId: sample-app + message: Cluster deleted successfully schema: - $ref: "#/components/schemas/OpenClusterDTO" - description: 成功获取集群信息 + $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + description: 集群删除成功 + "400": + content: + application/json: + example: + message: Cannot delete cluster with existing configurations + schema: + $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + description: 删除失败,集群可能包含配置 + "403": + content: + application/json: + example: + message: Access is denied + schema: + $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" + description: 权限不足 "404": content: application/json: @@ -1826,17 +1811,16 @@ paths: schema: $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" description: 集群不存在 - summary: 获取指定集群信息 + summary: 删除集群 tags: - Cluster Management x-accepts: - application/json x-tags: - tag: Cluster Management - /openapi/v1/apps/{appId}/clusters: - post: + get: deprecated: false - description: "POST /openapi/v1/apps/{appId}/clusters" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" parameters: - description: "" explode: false @@ -1846,71 +1830,57 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/OpenClusterDTO" - description: "" - required: - - appId - - dataChangeCreatedBy - - name - type: object + - description: "" + explode: false + in: path + name: clusterName + required: true + schema: + type: string + style: simple + - description: "" + explode: false + in: path + name: env required: true + schema: + type: string + style: simple responses: "200": content: application/json: example: dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo + dataChangeLastModifiedBy: ops-user dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: test-cluster + dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z + name: production appId: sample-app schema: $ref: "#/components/schemas/OpenClusterDTO" - description: 集群创建成功 - "400": - content: - application/json: - example: - message: name and dataChangeCreatedBy should not be null or empty - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 请求参数错误 - "403": + description: 成功获取集群信息 + "404": content: application/json: example: - message: Access is denied + message: Cluster not found schema: $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 权限不足 - summary: 创建集群 + description: 集群不存在 + summary: 获取指定集群信息 tags: - Cluster Management - x-content-type: application/json x-accepts: - application/json x-tags: - tag: Cluster Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: + /openapi/v1/envs/{env}/apps/{appId}/clusters: + post: deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters" parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1918,31 +1888,48 @@ paths: schema: type: string style: simple - - description: "" - explode: false + - explode: false in: path - name: clusterName + name: env required: true schema: type: string style: simple + requestBody: + content: + application/json: + schema: + allOf: + - $ref: "#/components/schemas/OpenClusterDTO" + description: 创建集群请求体 + required: + - appId + - dataChangeCreatedBy + - name + type: object + required: true responses: "200": content: application/json: example: - message: Cluster deleted successfully + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-15T10:30:00.000Z + dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z + name: test-cluster + appId: sample-app schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群删除成功 + $ref: "#/components/schemas/OpenClusterDTO" + description: 集群创建成功 "400": content: application/json: example: - message: Cannot delete cluster with existing configurations + message: name and dataChangeCreatedBy should not be null or empty schema: $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 删除失败,集群可能包含配置 + description: 请求参数错误 "403": content: application/json: @@ -1951,17 +1938,10 @@ paths: schema: $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" description: 权限不足 - "404": - content: - application/json: - example: - message: Cluster not found - schema: - $ref: "#/components/schemas/_openapi_v1_apps_get_401_response" - description: 集群不存在 - summary: 删除集群 + summary: 创建集群 tags: - Cluster Management + x-content-type: application/json x-accepts: - application/json x-tags: @@ -1969,9 +1949,9 @@ paths: /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: post: deprecated: false - description: "" + description: 创建并发布当前命名空间的配置 parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -1979,7 +1959,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -1987,7 +1967,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -1995,7 +1975,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2009,7 +1989,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" + description: 创建发布请求体 required: - releaseTitle - releasedBy @@ -2064,9 +2044,9 @@ paths: /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: get: deprecated: false - description: "" + description: 查询命名空间最新活跃发布 parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2074,7 +2054,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2082,7 +2062,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2090,7 +2070,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2139,9 +2119,9 @@ paths: /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: post: deprecated: false - description: "" + description: 合并灰度分支并可选择删除分支 parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2149,7 +2129,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2157,7 +2137,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2165,7 +2145,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2173,7 +2153,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -2181,7 +2161,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 合并后是否删除分支(true/false) example: "true" explode: true in: query @@ -2196,7 +2176,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" + description: 合并分支并发布的请求体 required: - releaseTitle - releasedBy @@ -2252,9 +2232,9 @@ paths: /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: post: deprecated: false - description: "" + description: 在分支上创建灰度发布 parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2262,7 +2242,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2270,7 +2250,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2278,7 +2258,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2286,7 +2266,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -2300,7 +2280,7 @@ paths: schema: allOf: - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" + description: 创建灰度发布请求体 required: - releaseTitle - releasedBy @@ -2326,7 +2306,7 @@ paths: comment: "" schema: $ref: "#/components/schemas/OpenReleaseDTO" - description: "" + description: 灰度发布创建成功 summary: 创建灰度发布 tags: - Namespace Branch Management @@ -2425,9 +2405,9 @@ paths: /openapi/v1/envs/{env}/releases/{releaseId}/rollback: put: deprecated: false - description: "" + description: 回滚到指定的发布版本 parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2435,7 +2415,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 发布ID explode: false in: path name: releaseId @@ -2443,11 +2423,11 @@ paths: schema: type: integer style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -2458,7 +2438,7 @@ paths: schema: properties: {} type: object - description: "" + description: 发布回滚成功 summary: 回滚发布 tags: - Release Management @@ -2471,7 +2451,7 @@ paths: deprecated: false description: "GET /openapi/v1/envs/{env}/releases/{releaseId}" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2479,7 +2459,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 发布ID explode: false in: path name: releaseId @@ -2507,7 +2487,7 @@ paths: comment: "" schema: $ref: "#/components/schemas/OpenReleaseDTO" - description: "" + description: 成功获取发布详情 summary: 获取发布详情 tags: - Release Management @@ -2520,7 +2500,7 @@ paths: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2528,7 +2508,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2536,7 +2516,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2544,7 +2524,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2552,7 +2532,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2561,7 +2541,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 5 explode: true in: query @@ -2596,9 +2576,9 @@ paths: value: "" schema: items: - $ref: "#/components/schemas/ListReleaseBO" + $ref: "#/components/schemas/OpenReleaseBO" type: array - description: "" + description: 成功获取发布列表 summary: 获取所有发布(分页) tags: - Release Management @@ -2611,7 +2591,7 @@ paths: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2619,7 +2599,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2627,7 +2607,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2635,7 +2615,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2643,7 +2623,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2652,7 +2632,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 5 explode: true in: query @@ -2683,7 +2663,7 @@ paths: items: $ref: "#/components/schemas/OpenReleaseDTO" type: array - description: "" + description: 成功获取活跃发布列表 summary: 获取活跃发布(分页) tags: - Release Management @@ -2691,65 +2671,19 @@ paths: - application/json x-tags: - tag: Release Management - /openapi/v1/envs/{env}/releases/compare: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/compare" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" parameters: - - description: "" - explode: false + - explode: false in: path name: env required: true schema: type: string style: simple - - description: "" - explode: true - in: query - name: baseReleaseId - required: true - schema: - type: integer - style: form - - description: "" - explode: true - in: query - name: toCompareReleaseId - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - changes: - - type: "" - entity: - firstEntity: - key: "" - value: "" - secondEntity: - key: "" - value: "" - schema: - $ref: "#/components/schemas/_openapi_v1_envs__env__releases_compare_get_200_response" - description: "" - summary: 对比发布 - tags: - - Release Management - x-accepts: - - application/json - x-tags: - - tag: Release Management - /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2757,7 +2691,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2765,7 +2699,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2779,7 +2713,7 @@ paths: application/json: schema: type: integer - description: "" + description: 成功返回实例数量 summary: 获取命名空间下的实例数量 tags: - Instance Management @@ -2787,12 +2721,12 @@ paths: - application/json x-tags: - tag: Instance Management - /openapi/v1/envs/{env}/releases/{releaseId}/instances: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_search" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2800,15 +2734,35 @@ paths: schema: type: string style: simple - - description: "" - explode: false + - explode: false in: path - name: releaseId + name: appId required: true schema: - type: integer + type: string style: simple - - description: "" + - explode: false + in: path + name: clusterName + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: namespaceName + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: instanceAppId + required: false + schema: + type: string + style: form + - description: 页码,从0开始 example: 0 explode: true in: query @@ -2817,7 +2771,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 20 explode: true in: query @@ -2860,7 +2814,7 @@ paths: dataChangeCreatedTime: "" schema: $ref: "#/components/schemas/OpenPageDTOOpenInstanceDTO" - description: "" + description: 成功获取实例列表 summary: 根据发布版本查询实例(支持分页) tags: - Instance Management @@ -2868,12 +2822,12 @@ paths: - application/json x-tags: - tag: Instance Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: + /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" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in?excludeReleases=1,2,3" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -2881,7 +2835,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -2889,7 +2843,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -2897,7 +2851,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -2945,7 +2899,7 @@ paths: items: $ref: "#/components/schemas/OpenInstanceDTO" type: array - description: "" + description: 成功返回实例列表 summary: 查询不在指定发布版本中的实例 tags: - Instance Management @@ -3317,7 +3271,7 @@ paths: deprecated: false description: "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3325,7 +3279,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3340,7 +3294,7 @@ paths: schema: properties: {} type: object - description: "" + description: AppNamespace删除成功 summary: 删除AppNamespace tags: - App Management @@ -3352,7 +3306,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3360,7 +3314,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3385,7 +3339,7 @@ paths: comment: "" schema: $ref: "#/components/schemas/OpenAppNamespaceDTO" - description: "" + description: 成功获取AppNamespace summary: 获取指定的AppNamespace tags: - Namespace Management @@ -3398,7 +3352,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}/namespaces/releases/status" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3420,7 +3374,7 @@ paths: type: boolean type: object type: object - description: "" + description: 成功获取发布状态映射 summary: 获取应用下所有Namespace的发布状态 tags: - App Management @@ -3433,7 +3387,7 @@ paths: deprecated: false description: "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3441,7 +3395,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 公共命名空间名称 explode: false in: path name: publicNamespaceName @@ -3449,7 +3403,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 页码,从0开始 example: 0 explode: true in: query @@ -3458,7 +3412,7 @@ paths: schema: type: integer style: form - - description: "" + - description: 每页数量 example: 10 explode: true in: query @@ -3495,7 +3449,7 @@ paths: items: $ref: "#/components/schemas/OpenNamespaceDTO" type: array - description: "" + description: 成功获取实例列表 summary: 获取公共AppNamespace的所有实例 tags: - Namespace Management @@ -3508,7 +3462,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3516,7 +3470,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3524,7 +3478,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3532,7 +3486,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3566,7 +3520,7 @@ paths: comment: "" schema: $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" + description: 成功获取关联的公共Namespace summary: 获取关联的公共Namespace tags: - Namespace Management @@ -3579,7 +3533,7 @@ paths: deprecated: false description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3587,7 +3541,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3595,7 +3549,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3613,7 +3567,7 @@ paths: items: type: string type: array - description: "" + description: 缺失的命名空间名称列表 summary: 检查缺失的Namespace tags: - Namespace Management @@ -3626,7 +3580,7 @@ paths: deprecated: false description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3634,7 +3588,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3642,7 +3596,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3650,7 +3604,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3665,7 +3619,7 @@ paths: schema: properties: {} type: object - description: "" + description: 解除关联成功 summary: 删除关联的Namespace tags: - App Management @@ -3714,7 +3668,7 @@ paths: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3722,7 +3676,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3730,7 +3684,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3738,7 +3692,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3780,7 +3734,7 @@ paths: comment: 测试模式配置 schema: $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" + description: 成功获取分支信息 "404": content: application/json: @@ -3796,12 +3750,11 @@ paths: - application/json x-tags: - tag: Cluster Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3809,7 +3762,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3817,7 +3770,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3825,7 +3778,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3833,11 +3786,11 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -3867,7 +3820,7 @@ paths: comment: "" schema: $ref: "#/components/schemas/OpenNamespaceDTO" - description: "" + description: 命名空间分支创建成功 summary: 创建命名空间分支 tags: - Namespace Branch Management @@ -3880,7 +3833,7 @@ paths: deprecated: false description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3888,7 +3841,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3896,7 +3849,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3904,7 +3857,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3912,7 +3865,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3920,11 +3873,11 @@ paths: schema: type: string style: simple - - description: "" + - description: 操作人用户名 explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -3935,7 +3888,7 @@ paths: schema: properties: {} type: object - description: "" + description: 分支删除成功 summary: 删除命名空间分支 tags: - Namespace Branch Management @@ -3950,7 +3903,7 @@ paths: 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") parameters: - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -3958,7 +3911,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -3966,7 +3919,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -3974,7 +3927,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -3982,7 +3935,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -3990,7 +3943,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 合并后是否删除分支(true/false) example: "true" explode: true in: query @@ -3999,21 +3952,13 @@ paths: schema: type: boolean style: form - - description: "" - explode: false - in: header - name: X-Apollo-Operator - required: true - schema: - type: string - style: simple requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/NamespaceReleaseDTO" - description: "" + description: 合并分支发布请求体 required: - releaseTitle - releasedBy @@ -4039,7 +3984,7 @@ paths: comment: "" schema: $ref: "#/components/schemas/OpenReleaseDTO" - description: "" + description: 分支合并成功 summary: 合并分支到主分支 tags: - Namespace Branch Management @@ -4048,12 +3993,12 @@ paths: - application/json x-tags: - tag: Namespace Branch Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -4061,7 +4006,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -4069,7 +4014,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -4077,7 +4022,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -4085,7 +4030,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -4114,7 +4059,7 @@ paths: - "" schema: $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" + description: 成功获取灰度发布规则 summary: 获取分支灰度发布规则 tags: - Namespace Branch Management @@ -4124,9 +4069,9 @@ paths: - tag: Namespace Branch Management put: deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules" + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" parameters: - - description: "" + - description: 应用ID explode: false in: path name: appId @@ -4134,7 +4079,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 环境标识 explode: false in: path name: env @@ -4142,7 +4087,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 集群名称 explode: false in: path name: clusterName @@ -4150,7 +4095,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 命名空间名称 explode: false in: path name: namespaceName @@ -4158,7 +4103,7 @@ paths: schema: type: string style: simple - - description: "" + - description: 分支名称 explode: false in: path name: branchName @@ -4166,21 +4111,21 @@ paths: schema: type: string style: simple - - description: "" - explode: false - in: header + - description: 操作人用户名 + explode: true + in: query name: operator - required: true + required: false schema: type: string - style: simple + style: form requestBody: content: application/json: schema: allOf: - $ref: "#/components/schemas/OpenGrayReleaseRuleDTO" - description: "" + description: 更新灰度发布规则请求体 required: - ruleItems type: object @@ -4192,7 +4137,7 @@ paths: schema: properties: {} type: object - description: "" + description: 灰度规则更新成功 summary: 更新分支灰度发布规则 tags: - Namespace Branch Management @@ -4369,12 +4314,8 @@ components: type: string type: object MapString: - description: 字符串映射对象,用于表示键值对的配置数据结构 - example: - key: key - properties: - key: - type: string + additionalProperties: + type: string type: object OpenReleaseDTO: description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 @@ -4382,7 +4323,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -4421,7 +4362,9 @@ components: description: 发布名称,用于标识这次发布的版本或描述 type: string configurations: - $ref: "#/components/schemas/MapString" + additionalProperties: + type: string + type: object comment: description: 发布备注,描述本次发布的变更内容和目的 type: string @@ -4701,7 +4644,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -4716,7 +4659,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -4738,7 +4681,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -4753,7 +4696,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -4794,105 +4737,41 @@ components: - clusters properties: env: - description: "" + description: 环境标识,例如 DEV、FAT、UAT、PROD type: string clusters: - description: "" + description: 该环境下的集群名称列表 items: type: string type: array type: object - ClusterDTO: - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 6 - comment: comment - id: 0 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - name: - description: "" - pattern: "[0-9a-zA-Z_-]+[0-9a-zA-Z_.-]*" - type: string - appId: - description: "" - type: string - parentClusterId: - description: "" - format: int64 - type: integer - comment: - description: "" - type: string - required: - - appId - - name - type: object - EnvClusterInfo: + OpenEnvClusterInfo: example: env: env clusters: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - parentClusterId: 6 - comment: comment - id: 0 dataChangeLastModifiedTime: dataChangeLastModifiedTime - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime + - dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - parentClusterId: 6 - comment: comment - id: 0 dataChangeLastModifiedTime: dataChangeLastModifiedTime properties: env: - description: "" + description: 环境标识 type: string clusters: - description: "" + description: 集群信息列表 items: - $ref: "#/components/schemas/ClusterDTO" + $ref: "#/components/schemas/OpenClusterDTO" type: array type: object - NamespaceTextModel: + OpenNamespaceTextModel: example: configText: configText namespaceId: 0 @@ -4904,32 +4783,32 @@ components: operator: operator properties: appId: - description: "" + description: 应用唯一标识 type: string env: - description: "" + description: 环境标识 type: string clusterName: - description: "" + description: 集群名称 type: string namespaceName: - description: "" + description: 命名空间名称 type: string namespaceId: - description: "" + description: 命名空间ID format: int64 type: integer format: - description: "" + description: 命名空间格式类型(properties/xml/json/yml等) type: string configText: - description: "" + description: 配置内容的原始文本 type: string operator: - description: "" + description: 操作者用户名 type: string type: object - NamespaceIdentifier: + OpenNamespaceIdentifier: example: appId: appId clusterName: clusterName @@ -4937,77 +4816,19 @@ components: namespaceName: namespaceName properties: appId: - description: "" + description: 应用唯一标识 type: string env: - description: "" + description: 环境标识 type: string clusterName: - description: "" + description: 集群名称 type: string namespaceName: - description: "" - type: string - type: object - ItemDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 - comment: comment - id: 0 - value: value - key: key - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - namespaceId: - description: "" - format: int64 - type: integer - key: - description: "" - type: string - type: - description: "" - type: integer - value: - description: "" - type: string - comment: - description: "" + description: 命名空间名称 type: string - lineNum: - description: "" - type: integer type: object - ItemChangeSets: + OpenItemChangeSets: example: dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName @@ -5016,125 +4837,95 @@ components: dataChangeCreatedBy: dataChangeCreatedBy deleteItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key createItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key updateItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key dataChangeLastModifiedTime: dataChangeLastModifiedTime properties: dataChangeCreatedBy: - description: "" + description: 变更集合创建者用户名 type: string dataChangeLastModifiedBy: - description: "" + description: 变更集合最后修改者用户名 type: string dataChangeCreatedByDisplayName: - description: "" + description: 创建者显示名 type: string dataChangeLastModifiedByDisplayName: - description: "" + description: 最后修改者显示名 type: string dataChangeCreatedTime: - description: "" + description: 变更集合创建时间(ISO 8601) type: string dataChangeLastModifiedTime: - description: "" + description: 变更集合最后修改时间(ISO 8601) type: string createItems: default: [] - description: "" + description: 待创建的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: "#/components/schemas/OpenItemDTO" type: array updateItems: default: [] - description: "" + description: 待更新的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: "#/components/schemas/OpenItemDTO" type: array deleteItems: default: [] - description: "" + description: 待删除的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: "#/components/schemas/OpenItemDTO" type: array type: object - ListItemDiffs: + OpenItemDiffs: example: namespace: appId: appId @@ -5149,124 +4940,84 @@ components: dataChangeCreatedBy: dataChangeCreatedBy deleteItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key createItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key updateItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key dataChangeLastModifiedTime: dataChangeLastModifiedTime extInfo: extInfo properties: namespace: - $ref: "#/components/schemas/NamespaceIdentifier" + $ref: "#/components/schemas/OpenNamespaceIdentifier" diffs: - $ref: "#/components/schemas/ItemChangeSets" + $ref: "#/components/schemas/OpenItemChangeSets" extInfo: - description: "" + description: 扩展信息 type: string type: object - NamespaceSyncModel: + OpenNamespaceSyncModel: example: syncItems: - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeCreatedBy: dataChangeCreatedBy - type: 1 - dataChangeLastModifiedTime: dataChangeLastModifiedTime - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy - namespaceId: 6 - lineNum: 5 + dataChangeCreatedBy: dataChangeCreatedBy comment: comment - id: 0 + type: 0 value: value + dataChangeLastModifiedTime: dataChangeLastModifiedTime key: key syncToNamespaces: - appId: appId @@ -5279,110 +5030,42 @@ components: namespaceName: namespaceName properties: syncToNamespaces: - description: "" + description: 目标命名空间标识列表 items: - $ref: "#/components/schemas/NamespaceIdentifier" + $ref: "#/components/schemas/OpenNamespaceIdentifier" type: array syncItems: - description: "" + description: 需要同步的配置项列表 items: - $ref: "#/components/schemas/ItemDTO" + $ref: "#/components/schemas/OpenItemDTO" type: array type: object - ReleaseDTO: - example: - dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: "" - type: string - dataChangeLastModifiedBy: - description: "" - type: string - dataChangeCreatedByDisplayName: - description: "" - type: string - dataChangeLastModifiedByDisplayName: - description: "" - type: string - dataChangeCreatedTime: - description: "" - type: string - dataChangeLastModifiedTime: - description: "" - type: string - id: - description: "" - format: int64 - type: integer - releaseKey: - description: "" - type: string - name: - description: "" - type: string - appId: - description: "" - type: string - clusterName: - description: "" - type: string - namespaceName: - description: "" - type: string - configurations: - description: "" - type: string - comment: - description: "" - type: string - isAbandoned: - description: "" - type: boolean - type: object KVEntity: example: value: value key: key properties: key: - description: "" + description: 键 type: string value: - description: "" + description: 值 type: string type: object - ListReleaseBO: + OpenReleaseBO: example: baseInfo: dataChangeCreatedTime: dataChangeCreatedTime - configurations: configurations - dataChangeCreatedBy: dataChangeCreatedBy - releaseKey: releaseKey - dataChangeLastModifiedTime: dataChangeLastModifiedTime - isAbandoned: true - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName dataChangeLastModifiedBy: dataChangeLastModifiedBy + configurations: + key: configurations appId: appId clusterName: clusterName + dataChangeCreatedBy: dataChangeCreatedBy name: name comment: comment id: 0 + dataChangeLastModifiedTime: dataChangeLastModifiedTime namespaceName: namespaceName items: - value: value @@ -5391,48 +5074,12 @@ components: key: key properties: baseInfo: - $ref: "#/components/schemas/ReleaseDTO" + $ref: "#/components/schemas/OpenReleaseDTO" items: - description: "" items: $ref: "#/components/schemas/KVEntity" type: array type: object - EntityPairKVEntity: - example: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - firstEntity: - $ref: "#/components/schemas/KVEntity" - secondEntity: - $ref: "#/components/schemas/KVEntity" - type: object - Change: - example: - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - type: - description: "" - enum: - - ADDED - - MODIFIED - - DELETED - type: string - entity: - $ref: "#/components/schemas/EntityPairKVEntity" - type: object OpenInstanceConfigDTO: example: releaseDeliveryTime: releaseDeliveryTime @@ -5440,7 +5087,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -5454,10 +5101,10 @@ components: release: $ref: "#/components/schemas/OpenReleaseDTO" releaseDeliveryTime: - description: "" + description: 配置下发时间(ISO 8601) type: string dataChangeLastModifiedTime: - description: "" + description: 最后修改时间(ISO 8601) type: string type: object OpenInstanceDTO: @@ -5468,7 +5115,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -5483,7 +5130,7 @@ components: dataChangeCreatedTime: dataChangeCreatedTime dataChangeLastModifiedBy: dataChangeLastModifiedBy configurations: - key: key + key: configurations appId: appId clusterName: clusterName dataChangeCreatedBy: dataChangeCreatedBy @@ -5501,28 +5148,28 @@ components: id: 5 properties: id: - description: "" + description: 实例ID format: int64 type: integer appId: - description: "" + description: 实例所属应用ID type: string clusterName: - description: "" + description: 实例所属集群名称 type: string dataCenter: - description: "" + description: 数据中心/机房标识 type: string ip: - description: "" + description: 实例IP地址 type: string configs: - description: "" + description: 实例当前生效的配置列表 items: $ref: "#/components/schemas/OpenInstanceConfigDTO" type: array dataChangeCreatedTime: - description: "" + description: 数据创建时间(ISO 8601) type: string type: object OpenOrganizationDto: @@ -5531,10 +5178,10 @@ components: orgId: orgId properties: orgId: - description: "" + description: 组织ID type: string orgName: - description: "" + description: 组织名称 type: string type: object _openapi_v1_apps_get_401_response: @@ -5547,7 +5194,7 @@ components: _openapi_v1_apps_post_request: allOf: - $ref: "#/components/schemas/OpenCreateAppDTO" - description: "" + description: 创建应用请求体,包含应用基本信息与管理员设置 properties: app: allOf: @@ -5573,58 +5220,6 @@ components: exception: type: string type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_200_response: - example: - valid: true - message: message - properties: - valid: - type: boolean - message: - type: string - type: object - _openapi_v1_envs__env__apps__appId__clusters__clusterName__namespaces__namespaceName__items_validate_post_400_response: - example: - valid: true - message: message - errors: - - errors - - errors - properties: - valid: - type: boolean - message: - type: string - errors: - items: - type: string - type: array - type: object - _openapi_v1_envs__env__releases_compare_get_200_response: - example: - changes: - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - - type: ADDED - entity: - firstEntity: - value: value - key: key - secondEntity: - value: value - key: key - properties: - changes: - items: - $ref: "#/components/schemas/Change" - type: array - type: object securitySchemes: ApiKeyAuth: description: | diff --git a/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java b/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java index 550f903..b268fc8 100644 --- a/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java +++ b/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java @@ -10,4 +10,4 @@ class OpenApiGeneratorApplicationTests { void contextLoads() { } -} \ No newline at end of file +} diff --git a/typescript/.gitignore b/typescript/.gitignore deleted file mode 100644 index 149b576..0000000 --- a/typescript/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/typescript/.npmignore b/typescript/.npmignore deleted file mode 100644 index 42061c0..0000000 --- a/typescript/.npmignore +++ /dev/null @@ -1 +0,0 @@ -README.md \ No newline at end of file diff --git a/typescript/.openapi-generator-ignore b/typescript/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/typescript/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES deleted file mode 100644 index f4667da..0000000 --- a/typescript/.openapi-generator/FILES +++ /dev/null @@ -1,56 +0,0 @@ -.gitignore -.npmignore -.openapi-generator-ignore -README.md -package.json -src/apis/AppManagementApi.ts -src/apis/ClusterManagementApi.ts -src/apis/InstanceManagementApi.ts -src/apis/ItemManagementApi.ts -src/apis/NamespaceBranchManagementApi.ts -src/apis/NamespaceManagementApi.ts -src/apis/OrganizationManagementApi.ts -src/apis/ReleaseManagementApi.ts -src/apis/index.ts -src/index.ts -src/models/Change.ts -src/models/ClusterDTO.ts -src/models/EntityPairKVEntity.ts -src/models/EnvClusterInfo.ts -src/models/ItemChangeSets.ts -src/models/ItemDTO.ts -src/models/KVEntity.ts -src/models/ListItemDiffs.ts -src/models/ListReleaseBO.ts -src/models/MapString.ts -src/models/NamespaceGrayDelReleaseDTO.ts -src/models/NamespaceIdentifier.ts -src/models/NamespaceReleaseDTO.ts -src/models/NamespaceSyncModel.ts -src/models/NamespaceTextModel.ts -src/models/OpenAppDTO.ts -src/models/OpenAppNamespaceDTO.ts -src/models/OpenClusterDTO.ts -src/models/OpenCreateAppDTO.ts -src/models/OpenEnvClusterDTO.ts -src/models/OpenGrayReleaseRuleDTO.ts -src/models/OpenGrayReleaseRuleItemDTO.ts -src/models/OpenInstanceConfigDTO.ts -src/models/OpenInstanceDTO.ts -src/models/OpenItemDTO.ts -src/models/OpenNamespaceDTO.ts -src/models/OpenNamespaceLockDTO.ts -src/models/OpenOrganizationDto.ts -src/models/OpenPageDTOOpenInstanceDTO.ts -src/models/OpenPageDTOOpenItemDTO.ts -src/models/OpenReleaseDTO.ts -src/models/OpenapiV1AppsGet401Response.ts -src/models/OpenapiV1AppsPost400Response.ts -src/models/OpenapiV1AppsPostRequest.ts -src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts -src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts -src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts -src/models/ReleaseDTO.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/typescript/.openapi-generator/VERSION b/typescript/.openapi-generator/VERSION deleted file mode 100644 index 368fd8f..0000000 --- a/typescript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.15.0 diff --git a/typescript/README.md b/typescript/README.md deleted file mode 100644 index 294a163..0000000 --- a/typescript/README.md +++ /dev/null @@ -1,46 +0,0 @@ -## apollo-openapi@0.0.1 - -This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: - -Environment -* Node.js -* Webpack -* Browserify - -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html)) - -### Building - -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build -``` - -### Publishing - -First build the package then run `npm publish` - -### Consuming - -navigate to the folder of your consuming project and run one of the following commands. - -_published:_ - -``` -npm install apollo-openapi@0.0.1 --save -``` - -_unPublished (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE --save -``` diff --git a/typescript/package.json b/typescript/package.json deleted file mode 100644 index a6ecb61..0000000 --- a/typescript/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "apollo-openapi", - "version": "0.0.1", - "description": "OpenAPI client for apollo-openapi", - "author": "OpenAPI-Generator", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "devDependencies": { - "typescript": "^4.0 || ^5.0" - } -} diff --git a/typescript/src/apis/AppManagementApi.ts b/typescript/src/apis/AppManagementApi.ts deleted file mode 100644 index 51e0360..0000000 --- a/typescript/src/apis/AppManagementApi.ts +++ /dev/null @@ -1,700 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - EnvClusterInfo, - OpenAppDTO, - OpenEnvClusterDTO, - OpenapiV1AppsGet401Response, - OpenapiV1AppsPost400Response, - OpenapiV1AppsPostRequest, -} from '../models/index'; -import { - EnvClusterInfoFromJSON, - EnvClusterInfoToJSON, - OpenAppDTOFromJSON, - OpenAppDTOToJSON, - OpenEnvClusterDTOFromJSON, - OpenEnvClusterDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, - OpenapiV1AppsPost400ResponseFromJSON, - OpenapiV1AppsPost400ResponseToJSON, - OpenapiV1AppsPostRequestFromJSON, - OpenapiV1AppsPostRequestToJSON, -} from '../models/index'; - -export interface OpenapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRequest { - appId: string; - namespaceName: string; -} - -export interface OpenapiV1AppsAppIdDeleteRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdEnvClustersGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1AppsAppIdGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdMissEnvsGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdNamespacesReleasesStatusGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdNavtreeGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdPutRequest { - appId: string; - openAppDTO: OpenAppDTO; -} - -export interface OpenapiV1AppsEnvsEnvPostRequest { - env: string; - openAppDTO: OpenAppDTO; -} - -export interface OpenapiV1AppsGetRequest { - authorized?: string; -} - -export interface OpenapiV1AppsPostOperationRequest { - openapiV1AppsPostRequest: OpenapiV1AppsPostRequest; -} - -/** - * - */ -export class AppManagementApi extends runtime.BaseAPI { - - /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameDelete(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdAppnamespacesNamespaceNameDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/apps/{appId} - * 删除应用 - */ - async openapiV1AppsAppIdDeleteRaw(requestParameters: OpenapiV1AppsAppIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * DELETE /openapi/v1/apps/{appId} - * 删除应用 - */ - async openapiV1AppsAppIdDelete(requestParameters: OpenapiV1AppsAppIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/env-clusters - * 获取应用的环境集群信息 - */ - async openapiV1AppsAppIdEnvClustersGetRaw(requestParameters: OpenapiV1AppsAppIdEnvClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvClustersGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/env-clusters`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenEnvClusterDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/env-clusters - * 获取应用的环境集群信息 - */ - async openapiV1AppsAppIdEnvClustersGet(requestParameters: OpenapiV1AppsAppIdEnvClustersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdEnvClustersGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * 删除关联的Namespace - */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRaw(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * 删除关联的Namespace - */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDelete(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinksDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId} - * 获取单个应用信息 - */ - async openapiV1AppsAppIdGetRaw(requestParameters: OpenapiV1AppsAppIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId} - * 获取单个应用信息 - */ - async openapiV1AppsAppIdGet(requestParameters: OpenapiV1AppsAppIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/miss_envs - * 查找缺失的环境 - */ - async openapiV1AppsAppIdMissEnvsGetRaw(requestParameters: OpenapiV1AppsAppIdMissEnvsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdMissEnvsGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/miss_envs`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/miss_envs - * 查找缺失的环境 - */ - async openapiV1AppsAppIdMissEnvsGet(requestParameters: OpenapiV1AppsAppIdMissEnvsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdMissEnvsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 - */ - async openapiV1AppsAppIdNamespacesReleasesStatusGetRaw(requestParameters: OpenapiV1AppsAppIdNamespacesReleasesStatusGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdNamespacesReleasesStatusGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/namespaces/releases/status`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 - */ - async openapiV1AppsAppIdNamespacesReleasesStatusGet(requestParameters: OpenapiV1AppsAppIdNamespacesReleasesStatusGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: boolean; }; }> { - const response = await this.openapiV1AppsAppIdNamespacesReleasesStatusGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/navtree - * 获取应用导航树 - */ - async openapiV1AppsAppIdNavtreeGetRaw(requestParameters: OpenapiV1AppsAppIdNavtreeGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdNavtreeGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/navtree`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(EnvClusterInfoFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/navtree - * 获取应用导航树 - */ - async openapiV1AppsAppIdNavtreeGet(requestParameters: OpenapiV1AppsAppIdNavtreeGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdNavtreeGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /openapi/v1/apps/{appId} - * 更新应用 - */ - async openapiV1AppsAppIdPutRaw(requestParameters: OpenapiV1AppsAppIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdPut().' - ); - } - - if (requestParameters['openAppDTO'] == null) { - throw new runtime.RequiredError( - 'openAppDTO', - 'Required parameter "openAppDTO" was null or undefined when calling openapiV1AppsAppIdPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenAppDTOToJSON(requestParameters['openAppDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); - } - - /** - * PUT /openapi/v1/apps/{appId} - * 更新应用 - */ - async openapiV1AppsAppIdPut(requestParameters: OpenapiV1AppsAppIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer的应用列表(分页) - */ - async openapiV1AppsBySelfGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/by-self`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer的应用列表(分页) - */ - async openapiV1AppsBySelfGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsBySelfGetRaw(initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps/envs/{env} - * 在指定环境创建应用 - */ - async openapiV1AppsEnvsEnvPostRaw(requestParameters: OpenapiV1AppsEnvsEnvPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsEnvsEnvPost().' - ); - } - - if (requestParameters['openAppDTO'] == null) { - throw new runtime.RequiredError( - 'openAppDTO', - 'Required parameter "openAppDTO" was null or undefined when calling openapiV1AppsEnvsEnvPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/envs/{env}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenAppDTOToJSON(requestParameters['openAppDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/apps/envs/{env} - * 在指定环境创建应用 - */ - async openapiV1AppsEnvsEnvPost(requestParameters: OpenapiV1AppsEnvsEnvPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsEnvsEnvPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps?authorized=true - * 获取当前Consumer授权的应用列表 - */ - async openapiV1AppsGetRaw(requestParameters: OpenapiV1AppsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters['authorized'] != null) { - queryParameters['authorized'] = requestParameters['authorized']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps?authorized=true - * 获取当前Consumer授权的应用列表 - */ - async openapiV1AppsGet(requestParameters: OpenapiV1AppsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps - * 创建应用 - */ - async openapiV1AppsPostRaw(requestParameters: OpenapiV1AppsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['openapiV1AppsPostRequest'] == null) { - throw new runtime.RequiredError( - 'openapiV1AppsPostRequest', - 'Required parameter "openapiV1AppsPostRequest" was null or undefined when calling openapiV1AppsPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps`; - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenapiV1AppsPostRequestToJSON(requestParameters['openapiV1AppsPostRequest']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/apps - * 创建应用 - */ - async openapiV1AppsPost(requestParameters: OpenapiV1AppsPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsPostRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/ClusterManagementApi.ts b/typescript/src/apis/ClusterManagementApi.ts deleted file mode 100644 index e93384f..0000000 --- a/typescript/src/apis/ClusterManagementApi.ts +++ /dev/null @@ -1,375 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenClusterDTO, - OpenNamespaceDTO, - OpenapiV1AppsGet401Response, -} from '../models/index'; -import { - OpenClusterDTOFromJSON, - OpenClusterDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1AppsAppIdClustersClusterNameGetRequest { - appId: string; - clusterName: string; -} - -export interface OpenapiV1AppsAppIdClustersPostRequest { - appId: string; - openClusterDTO: OpenClusterDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRequest { - env: string; - appId: string; - clusterName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - fillItemDetail: boolean; -} - -/** - * - */ -export class ClusterManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * 获取指定集群信息 - */ - async openapiV1AppsAppIdClustersClusterNameGetRaw(requestParameters: OpenapiV1AppsAppIdClustersClusterNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/clusters/{clusterName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenClusterDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName} - * 获取指定集群信息 - */ - async openapiV1AppsAppIdClustersClusterNameGet(requestParameters: OpenapiV1AppsAppIdClustersClusterNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdClustersClusterNameGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps/{appId}/clusters - * 创建集群 - */ - async openapiV1AppsAppIdClustersPostRaw(requestParameters: OpenapiV1AppsAppIdClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdClustersPost().' - ); - } - - if (requestParameters['openClusterDTO'] == null) { - throw new runtime.RequiredError( - 'openClusterDTO', - 'Required parameter "openClusterDTO" was null or undefined when calling openapiV1AppsAppIdClustersPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/clusters`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenClusterDTOToJSON(requestParameters['openClusterDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenClusterDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/apps/{appId}/clusters - * 创建集群 - */ - async openapiV1AppsAppIdClustersPost(requestParameters: OpenapiV1AppsAppIdClustersPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdClustersPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 删除集群 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete().' - ); - } - - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 删除集群 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 获取命名空间分支信息 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 获取命名空间分支信息 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['fillItemDetail'] == null) { - throw new runtime.RequiredError( - 'fillItemDetail', - 'Required parameter "fillItemDetail" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['fillItemDetail'] != null) { - queryParameters['fillItemDetail'] = requestParameters['fillItemDetail']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameGetRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/InstanceManagementApi.ts b/typescript/src/apis/InstanceManagementApi.ts deleted file mode 100644 index a3e359e..0000000 --- a/typescript/src/apis/InstanceManagementApi.ts +++ /dev/null @@ -1,261 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenInstanceDTO, - OpenPageDTOOpenInstanceDTO, -} from '../models/index'; -import { - OpenInstanceDTOFromJSON, - OpenInstanceDTOToJSON, - OpenPageDTOOpenInstanceDTOFromJSON, - OpenPageDTOOpenInstanceDTOToJSON, -} from '../models/index'; - -export interface OpenapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest { - appId: string; - clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - excludeReleases?: string; -} - -export interface OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest { - env: string; - releaseId: number; - page: number; - size: number; -} - -/** - * - */ -export class InstanceManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 - */ - async openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters: OpenapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - 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; - } - } - - /** - * GET /openapi/v1/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 - */ - async openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(requestParameters: OpenapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * 查询不在指定发布版本中的实例 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['excludeReleases'] != null) { - queryParameters['excludeReleases'] = requestParameters['excludeReleases']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenInstanceDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * 查询不在指定发布版本中的实例 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * 根据发布版本查询实例(支持分页) - */ - async openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); - } - - if (requestParameters['releaseId'] == null) { - throw new runtime.RequiredError( - 'releaseId', - 'Required parameter "releaseId" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); - } - - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); - } - - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdInstancesGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/releases/{releaseId}/instances`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters['releaseId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenInstanceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances - * 根据发布版本查询实例(支持分页) - */ - async openapiV1EnvsEnvReleasesReleaseIdInstancesGet(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesReleaseIdInstancesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/ItemManagementApi.ts b/typescript/src/apis/ItemManagementApi.ts deleted file mode 100644 index e8e7091..0000000 --- a/typescript/src/apis/ItemManagementApi.ts +++ /dev/null @@ -1,1216 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ListItemDiffs, - NamespaceSyncModel, - NamespaceTextModel, - OpenItemDTO, - OpenPageDTOOpenItemDTO, - OpenapiV1AppsGet401Response, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response, -} from '../models/index'; -import { - ListItemDiffsFromJSON, - ListItemDiffsToJSON, - NamespaceSyncModelFromJSON, - NamespaceSyncModelToJSON, - NamespaceTextModelFromJSON, - NamespaceTextModelToJSON, - OpenItemDTOFromJSON, - OpenItemDTOToJSON, - OpenPageDTOOpenItemDTOFromJSON, - OpenPageDTOOpenItemDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSON, - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - operator: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - createIfNotExists: boolean; - openItemDTO: OpenItemDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - namespaceTextModel: NamespaceTextModel; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - namespaceSyncModel: NamespaceSyncModel; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - page: number; - size: number; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - operator: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - createIfNotExists: boolean; - openItemDTO: OpenItemDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - openItemDTO: OpenItemDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - namespaceSyncModel: NamespaceSyncModel; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - namespaceTextModel: NamespaceTextModel; -} - -/** - * - */ -export class ItemManagementApi extends runtime.BaseAPI { - - /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key删除配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); - } - - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key删除配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * 通过查询参数获取配置项(支持编码的key) - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); - } - - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items?key={key}&encoded={true|false} - * 通过查询参数获取配置项(支持编码的key) - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['createIfNotExists'] == null) { - throw new runtime.RequiredError( - 'createIfNotExists', - 'Required parameter "createIfNotExists" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - if (requestParameters['openItemDTO'] == null) { - throw new runtime.RequiredError( - 'openItemDTO', - 'Required parameter "openItemDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['createIfNotExists'] != null) { - queryParameters['createIfNotExists'] = requestParameters['createIfNotExists']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenItemDTOToJSON(requestParameters['openItemDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKeyPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * 通过文本批量修改配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); - } - - if (requestParameters['namespaceTextModel'] == null) { - throw new runtime.RequiredError( - 'namespaceTextModel', - 'Required parameter "namespaceTextModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: NamespaceTextModelToJSON(requestParameters['namespaceTextModel']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:batchUpdate - * 通过文本批量修改配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdatePutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * 对比命名空间配置差异 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); - } - - if (requestParameters['namespaceSyncModel'] == null) { - throw new runtime.RequiredError( - 'namespaceSyncModel', - 'Required parameter "namespaceSyncModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceSyncModelToJSON(requestParameters['namespaceSyncModel']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ListItemDiffsFromJSON)); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:compare - * 对比命名空间配置差异 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsComparePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 获取命名空间下的配置项列表 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); - } - - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); - } - - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenItemDTOFromJSON(jsonValue)); - } - - /** - * - * 获取命名空间下的配置项列表 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 删除配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * DELETE /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 删除配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 获取单个配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); - } - - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 获取单个配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - if (requestParameters['key'] == null) { - throw new runtime.RequiredError( - 'key', - 'Required parameter "key" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - if (requestParameters['createIfNotExists'] == null) { - throw new runtime.RequiredError( - 'createIfNotExists', - 'Required parameter "createIfNotExists" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - if (requestParameters['openItemDTO'] == null) { - throw new runtime.RequiredError( - 'openItemDTO', - 'Required parameter "openItemDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['createIfNotExists'] != null) { - queryParameters['createIfNotExists'] = requestParameters['createIfNotExists']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"key"}}`, encodeURIComponent(String(requestParameters['key']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenItemDTOToJSON(requestParameters['openItemDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * PUT /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKeyPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * 创建新的配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); - } - - if (requestParameters['openItemDTO'] == null) { - throw new runtime.RequiredError( - 'openItemDTO', - 'Required parameter "openItemDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenItemDTOToJSON(requestParameters['openItemDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * 创建新的配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * 撤销配置项更改 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:revert - * 撤销配置项更改 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevertPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * 同步配置项到多个命名空间 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); - } - - if (requestParameters['namespaceSyncModel'] == null) { - throw new runtime.RequiredError( - 'namespaceSyncModel', - 'Required parameter "namespaceSyncModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceSyncModelToJSON(requestParameters['namespaceSyncModel']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1AppsGet401ResponseFromJSON(jsonValue)); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:sync - * 同步配置项到多个命名空间 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSyncPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * 验证配置文本语法 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); - } - - if (requestParameters['namespaceTextModel'] == null) { - throw new runtime.RequiredError( - 'namespaceTextModel', - 'Required parameter "namespaceTextModel" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceTextModelToJSON(requestParameters['namespaceTextModel']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSON(jsonValue)); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:validate - * 验证配置文本语法 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePostRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/NamespaceBranchManagementApi.ts b/typescript/src/apis/NamespaceBranchManagementApi.ts deleted file mode 100644 index 81aa3dd..0000000 --- a/typescript/src/apis/NamespaceBranchManagementApi.ts +++ /dev/null @@ -1,913 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - NamespaceGrayDelReleaseDTO, - NamespaceReleaseDTO, - OpenGrayReleaseRuleDTO, - OpenItemDTO, - OpenNamespaceDTO, - OpenReleaseDTO, - OpenapiV1AppsGet401Response, -} from '../models/index'; -import { - NamespaceGrayDelReleaseDTOFromJSON, - NamespaceGrayDelReleaseDTOToJSON, - NamespaceReleaseDTOFromJSON, - NamespaceReleaseDTOToJSON, - OpenGrayReleaseRuleDTOFromJSON, - OpenGrayReleaseRuleDTOToJSON, - OpenItemDTOFromJSON, - OpenItemDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenReleaseDTOFromJSON, - OpenReleaseDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - operator: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - branchName: string; - operator: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - namespaceGrayDelReleaseDTO: NamespaceGrayDelReleaseDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - operator: string; - openGrayReleaseRuleDTO: OpenGrayReleaseRuleDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - deleteBranch: boolean; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - branchName: string; - deleteBranch: boolean; - xApolloOperator: string; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - -/** - * - */ -export class NamespaceBranchManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * 创建命名空间分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branch - * 创建命名空间分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 删除命名空间分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); - } - - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 删除命名空间分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDelete(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 创建灰度删除发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - if (requestParameters['namespaceGrayDelReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceGrayDelReleaseDTO', - 'Required parameter "namespaceGrayDelReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceGrayDelReleaseDTOToJSON(requestParameters['namespaceGrayDelReleaseDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * - * 创建灰度删除发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayDelReleasesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 获取分支灰度发布规则 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenGrayReleaseRuleDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 获取分支灰度发布规则 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 更新分支灰度发布规则 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - if (requestParameters['openGrayReleaseRuleDTO'] == null) { - throw new runtime.RequiredError( - 'openGrayReleaseRuleDTO', - 'Required parameter "openGrayReleaseRuleDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['operator'] != null) { - headerParameters['operator'] = String(requestParameters['operator']); - } - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenGrayReleaseRuleDTOToJSON(requestParameters['openGrayReleaseRuleDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-rules - * 更新分支灰度发布规则 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPut(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameGrayRulesPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * 获取分支下的配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDTOFromJSON)); - } - - /** - * GET /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items - * 获取分支下的配置项 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItemsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 合并分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['deleteBranch'] == null) { - throw new runtime.RequiredError( - 'deleteBranch', - 'Required parameter "deleteBranch" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleteBranch'] != null) { - queryParameters['deleteBranch'] = requestParameters['deleteBranch']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * - * 合并分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameMergePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * 合并分支到主分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['deleteBranch'] == null) { - throw new runtime.RequiredError( - 'deleteBranch', - 'Required parameter "deleteBranch" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['xApolloOperator'] == null) { - throw new runtime.RequiredError( - 'xApolloOperator', - 'Required parameter "xApolloOperator" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['deleteBranch'] != null) { - queryParameters['deleteBranch'] = requestParameters['deleteBranch']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xApolloOperator'] != null) { - headerParameters['X-Apollo-Operator'] = String(requestParameters['xApolloOperator']); - } - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") - * 合并分支到主分支 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatch(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNamePatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 创建灰度发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['branchName'] == null) { - throw new runtime.RequiredError( - 'branchName', - 'Required parameter "branchName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - urlPath = urlPath.replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters['branchName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * - * 创建灰度发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameReleasesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/NamespaceManagementApi.ts b/typescript/src/apis/NamespaceManagementApi.ts deleted file mode 100644 index ce7abb1..0000000 --- a/typescript/src/apis/NamespaceManagementApi.ts +++ /dev/null @@ -1,620 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenAppNamespaceDTO, - OpenNamespaceDTO, - OpenNamespaceLockDTO, - OpenapiV1AppsGet401Response, -} from '../models/index'; -import { - OpenAppNamespaceDTOFromJSON, - OpenAppNamespaceDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenNamespaceLockDTOFromJSON, - OpenNamespaceLockDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1AppnamespacesGetRequest { - publicOnly: boolean; -} - -export interface OpenapiV1AppsAppIdAppnamespacesGetRequest { - appId: string; -} - -export interface OpenapiV1AppsAppIdAppnamespacesNamespaceNameGetRequest { - appId: string; - namespaceName: string; -} - -export interface OpenapiV1AppsAppIdAppnamespacesPostRequest { - appId: string; - openAppNamespaceDTO: OpenAppNamespaceDTO; -} - -export interface OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRequest { - appId: string; - env: string; - clusterName: string; -} - -export interface OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRequest { - env: string; - publicNamespaceName: string; - page: number; - size: number; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRequest { - appId: string; - env: string; - clusterName: string; - fillItemDetail: boolean; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -/** - * - */ -export class NamespaceManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/appnamespaces?public=true - * 获取所有公共AppNamespace - */ - async openapiV1AppnamespacesGetRaw(requestParameters: OpenapiV1AppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['publicOnly'] == null) { - throw new runtime.RequiredError( - 'publicOnly', - 'Required parameter "publicOnly" was null or undefined when calling openapiV1AppnamespacesGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['publicOnly'] != null) { - queryParameters['publicOnly'] = requestParameters['publicOnly']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/appnamespaces`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/appnamespaces?public=true - * 获取所有公共AppNamespace - */ - async openapiV1AppnamespacesGet(requestParameters: OpenapiV1AppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppnamespacesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesGetRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesGet(requestParameters: OpenapiV1AppsAppIdAppnamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdAppnamespacesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameGetRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdAppnamespacesNamespaceNameGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesNamespaceNameGet(requestParameters: OpenapiV1AppsAppIdAppnamespacesNamespaceNameGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdAppnamespacesNamespaceNameGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesPostRaw(requestParameters: OpenapiV1AppsAppIdAppnamespacesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdAppnamespacesPost().' - ); - } - - if (requestParameters['openAppNamespaceDTO'] == null) { - throw new runtime.RequiredError( - 'openAppNamespaceDTO', - 'Required parameter "openAppNamespaceDTO" was null or undefined when calling openapiV1AppsAppIdAppnamespacesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/appnamespaces`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenAppNamespaceDTOToJSON(requestParameters['openAppNamespaceDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace - */ - async openapiV1AppsAppIdAppnamespacesPost(requestParameters: OpenapiV1AppsAppIdAppnamespacesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdAppnamespacesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * 检查缺失的Namespace - */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRaw(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * 检查缺失的Namespace - */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGet(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheckGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * 获取关联的公共Namespace - */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRaw(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * 获取关联的公共Namespace - */ - async openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGet(requestParameters: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociationGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 - */ - async openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRaw(requestParameters: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['publicNamespaceName'] == null) { - throw new runtime.RequiredError( - 'publicNamespaceName', - 'Required parameter "publicNamespaceName" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); - } - - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"publicNamespaceName"}}`, encodeURIComponent(String(requestParameters['publicNamespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 - */ - async openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGet(requestParameters: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstancesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); - } - - if (requestParameters['fillItemDetail'] == null) { - throw new runtime.RequiredError( - 'fillItemDetail', - 'Required parameter "fillItemDetail" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['fillItemDetail'] != null) { - queryParameters['fillItemDetail'] = requestParameters['fillItemDetail']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceLockDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLockGetRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/OrganizationManagementApi.ts b/typescript/src/apis/OrganizationManagementApi.ts deleted file mode 100644 index 5e2c29d..0000000 --- a/typescript/src/apis/OrganizationManagementApi.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenOrganizationDto, - OpenapiV1AppsGet401Response, -} from '../models/index'; -import { - OpenOrganizationDtoFromJSON, - OpenOrganizationDtoToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, -} from '../models/index'; - -/** - * - */ -export class OrganizationManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/organizations - * 获取所有组织信息 - */ - async openapiV1OrganizationsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/organizations`; - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenOrganizationDtoFromJSON)); - } - - /** - * GET /openapi/v1/organizations - * 获取所有组织信息 - */ - async openapiV1OrganizationsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1OrganizationsGetRaw(initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/ReleaseManagementApi.ts b/typescript/src/apis/ReleaseManagementApi.ts deleted file mode 100644 index fcbdc78..0000000 --- a/typescript/src/apis/ReleaseManagementApi.ts +++ /dev/null @@ -1,592 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ListReleaseBO, - NamespaceReleaseDTO, - OpenReleaseDTO, - OpenapiV1AppsGet401Response, - OpenapiV1EnvsEnvReleasesCompareGet200Response, -} from '../models/index'; -import { - ListReleaseBOFromJSON, - ListReleaseBOToJSON, - NamespaceReleaseDTOFromJSON, - NamespaceReleaseDTOToJSON, - OpenReleaseDTOFromJSON, - OpenReleaseDTOToJSON, - OpenapiV1AppsGet401ResponseFromJSON, - OpenapiV1AppsGet401ResponseToJSON, - OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSON, - OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSON, -} from '../models/index'; - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - page: number; - size: number; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - page: number; - size: number; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - -export interface OpenapiV1EnvsEnvReleasesCompareGetRequest { - env: string; - baseReleaseId: number; - toCompareReleaseId: number; -} - -export interface OpenapiV1EnvsEnvReleasesReleaseIdGetRequest { - env: string; - releaseId: number; -} - -export interface OpenapiV1EnvsEnvReleasesReleaseIdRollbackPutRequest { - env: string; - releaseId: number; - operator: string; -} - -/** - * - */ -export class ReleaseManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * 获取活跃发布(分页) - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); - } - - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); - } - - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenReleaseDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active - * 获取活跃发布(分页) - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActiveGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * 获取所有发布(分页) - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); - } - - if (requestParameters['page'] == null) { - throw new runtime.RequiredError( - 'page', - 'Required parameter "page" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); - } - - if (requestParameters['size'] == null) { - throw new runtime.RequiredError( - 'size', - 'Required parameter "size" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['page'] != null) { - queryParameters['page'] = requestParameters['page']; - } - - if (requestParameters['size'] != null) { - queryParameters['size'] = requestParameters['size']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ListReleaseBOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all - * 获取所有发布(分页) - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAllGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 获取最新活跃发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * - * 获取最新活跃发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGet(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesLatestGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 创建发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRaw(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['appId'] == null) { - throw new runtime.RequiredError( - 'appId', - 'Required parameter "appId" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); - } - - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); - } - - if (requestParameters['clusterName'] == null) { - throw new runtime.RequiredError( - 'clusterName', - 'Required parameter "clusterName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); - } - - if (requestParameters['namespaceName'] == null) { - throw new runtime.RequiredError( - 'namespaceName', - 'Required parameter "namespaceName" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); - } - - if (requestParameters['namespaceReleaseDTO'] == null) { - throw new runtime.RequiredError( - 'namespaceReleaseDTO', - 'Required parameter "namespaceReleaseDTO" was null or undefined when calling openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases`; - urlPath = urlPath.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters['appId']))); - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters['clusterName']))); - urlPath = urlPath.replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters['namespaceName']))); - - const response = await this.request({ - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters['namespaceReleaseDTO']), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * - * 创建发布 - */ - async openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPost(requestParameters: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/releases/compare - * 对比发布 - */ - async openapiV1EnvsEnvReleasesCompareGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesCompareGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesCompareGet().' - ); - } - - if (requestParameters['baseReleaseId'] == null) { - throw new runtime.RequiredError( - 'baseReleaseId', - 'Required parameter "baseReleaseId" was null or undefined when calling openapiV1EnvsEnvReleasesCompareGet().' - ); - } - - if (requestParameters['toCompareReleaseId'] == null) { - throw new runtime.RequiredError( - 'toCompareReleaseId', - 'Required parameter "toCompareReleaseId" was null or undefined when calling openapiV1EnvsEnvReleasesCompareGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['baseReleaseId'] != null) { - queryParameters['baseReleaseId'] = requestParameters['baseReleaseId']; - } - - if (requestParameters['toCompareReleaseId'] != null) { - queryParameters['toCompareReleaseId'] = requestParameters['toCompareReleaseId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/releases/compare`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/releases/compare - * 对比发布 - */ - async openapiV1EnvsEnvReleasesCompareGet(requestParameters: OpenapiV1EnvsEnvReleasesCompareGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesCompareGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * 获取发布详情 - */ - async openapiV1EnvsEnvReleasesReleaseIdGetRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdGet().' - ); - } - - if (requestParameters['releaseId'] == null) { - throw new runtime.RequiredError( - 'releaseId', - 'Required parameter "releaseId" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/releases/{releaseId}`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters['releaseId']))); - - const response = await this.request({ - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * 获取发布详情 - */ - async openapiV1EnvsEnvReleasesReleaseIdGet(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesReleaseIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 回滚发布 - */ - async openapiV1EnvsEnvReleasesReleaseIdRollbackPutRaw(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdRollbackPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters['env'] == null) { - throw new runtime.RequiredError( - 'env', - 'Required parameter "env" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut().' - ); - } - - if (requestParameters['releaseId'] == null) { - throw new runtime.RequiredError( - 'releaseId', - 'Required parameter "releaseId" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut().' - ); - } - - if (requestParameters['operator'] == null) { - throw new runtime.RequiredError( - 'operator', - 'Required parameter "operator" was null or undefined when calling openapiV1EnvsEnvReleasesReleaseIdRollbackPut().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['operator'] != null) { - queryParameters['operator'] = requestParameters['operator']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - - let urlPath = `/openapi/v1/envs/{env}/releases/{releaseId}/rollback`; - urlPath = urlPath.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters['env']))); - urlPath = urlPath.replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters['releaseId']))); - - const response = await this.request({ - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * - * 回滚发布 - */ - async openapiV1EnvsEnvReleasesReleaseIdRollbackPut(requestParameters: OpenapiV1EnvsEnvReleasesReleaseIdRollbackPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.openapiV1EnvsEnvReleasesReleaseIdRollbackPutRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/index.ts b/typescript/src/apis/index.ts deleted file mode 100644 index f042130..0000000 --- a/typescript/src/apis/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './AppManagementApi'; -export * from './ClusterManagementApi'; -export * from './InstanceManagementApi'; -export * from './ItemManagementApi'; -export * from './NamespaceBranchManagementApi'; -export * from './NamespaceManagementApi'; -export * from './OrganizationManagementApi'; -export * from './ReleaseManagementApi'; diff --git a/typescript/src/index.ts b/typescript/src/index.ts deleted file mode 100644 index bebe8bb..0000000 --- a/typescript/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime'; -export * from './apis/index'; -export * from './models/index'; diff --git a/typescript/src/models/Change.ts b/typescript/src/models/Change.ts deleted file mode 100644 index 788b2d1..0000000 --- a/typescript/src/models/Change.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { EntityPairKVEntity } from './EntityPairKVEntity'; -import { - EntityPairKVEntityFromJSON, - EntityPairKVEntityFromJSONTyped, - EntityPairKVEntityToJSON, - EntityPairKVEntityToJSONTyped, -} from './EntityPairKVEntity'; - -/** - * - * @export - * @interface Change - */ -export interface Change { - /** - * - * @type {string} - * @memberof Change - */ - type?: ChangeTypeEnum; - /** - * - * @type {EntityPairKVEntity} - * @memberof Change - */ - entity?: EntityPairKVEntity; -} - - -/** - * @export - */ -export const ChangeTypeEnum = { - Added: 'ADDED', - Modified: 'MODIFIED', - Deleted: 'DELETED' -} as const; -export type ChangeTypeEnum = typeof ChangeTypeEnum[keyof typeof ChangeTypeEnum]; - - -/** - * Check if a given object implements the Change interface. - */ -export function instanceOfChange(value: object): value is Change { - return true; -} - -export function ChangeFromJSON(json: any): Change { - return ChangeFromJSONTyped(json, false); -} - -export function ChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Change { - if (json == null) { - return json; - } - return { - - 'type': json['type'] == null ? undefined : json['type'], - 'entity': json['entity'] == null ? undefined : EntityPairKVEntityFromJSON(json['entity']), - }; -} - -export function ChangeToJSON(json: any): Change { - return ChangeToJSONTyped(json, false); -} - -export function ChangeToJSONTyped(value?: Change | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'type': value['type'], - 'entity': EntityPairKVEntityToJSON(value['entity']), - }; -} - diff --git a/typescript/src/models/ClusterDTO.ts b/typescript/src/models/ClusterDTO.ts deleted file mode 100644 index fdaa7a3..0000000 --- a/typescript/src/models/ClusterDTO.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ClusterDTO - */ -export interface ClusterDTO { - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof ClusterDTO - */ - id?: number; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - name: string; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - appId: string; - /** - * - * @type {number} - * @memberof ClusterDTO - */ - parentClusterId?: number; - /** - * - * @type {string} - * @memberof ClusterDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the ClusterDTO interface. - */ -export function instanceOfClusterDTO(value: object): value is ClusterDTO { - if (!('name' in value) || value['name'] === undefined) return false; - if (!('appId' in value) || value['appId'] === undefined) return false; - return true; -} - -export function ClusterDTOFromJSON(json: any): ClusterDTO { - return ClusterDTOFromJSONTyped(json, false); -} - -export function ClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClusterDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'name': json['name'], - 'appId': json['appId'], - 'parentClusterId': json['parentClusterId'] == null ? undefined : json['parentClusterId'], - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} - -export function ClusterDTOToJSON(json: any): ClusterDTO { - return ClusterDTOToJSONTyped(json, false); -} - -export function ClusterDTOToJSONTyped(value?: ClusterDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'name': value['name'], - 'appId': value['appId'], - 'parentClusterId': value['parentClusterId'], - 'comment': value['comment'], - }; -} - diff --git a/typescript/src/models/EntityPairKVEntity.ts b/typescript/src/models/EntityPairKVEntity.ts deleted file mode 100644 index 4628bb8..0000000 --- a/typescript/src/models/EntityPairKVEntity.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { KVEntity } from './KVEntity'; -import { - KVEntityFromJSON, - KVEntityFromJSONTyped, - KVEntityToJSON, - KVEntityToJSONTyped, -} from './KVEntity'; - -/** - * - * @export - * @interface EntityPairKVEntity - */ -export interface EntityPairKVEntity { - /** - * - * @type {KVEntity} - * @memberof EntityPairKVEntity - */ - firstEntity?: KVEntity; - /** - * - * @type {KVEntity} - * @memberof EntityPairKVEntity - */ - secondEntity?: KVEntity; -} - -/** - * Check if a given object implements the EntityPairKVEntity interface. - */ -export function instanceOfEntityPairKVEntity(value: object): value is EntityPairKVEntity { - return true; -} - -export function EntityPairKVEntityFromJSON(json: any): EntityPairKVEntity { - return EntityPairKVEntityFromJSONTyped(json, false); -} - -export function EntityPairKVEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityPairKVEntity { - if (json == null) { - return json; - } - return { - - 'firstEntity': json['firstEntity'] == null ? undefined : KVEntityFromJSON(json['firstEntity']), - 'secondEntity': json['secondEntity'] == null ? undefined : KVEntityFromJSON(json['secondEntity']), - }; -} - -export function EntityPairKVEntityToJSON(json: any): EntityPairKVEntity { - return EntityPairKVEntityToJSONTyped(json, false); -} - -export function EntityPairKVEntityToJSONTyped(value?: EntityPairKVEntity | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'firstEntity': KVEntityToJSON(value['firstEntity']), - 'secondEntity': KVEntityToJSON(value['secondEntity']), - }; -} - diff --git a/typescript/src/models/EnvClusterInfo.ts b/typescript/src/models/EnvClusterInfo.ts deleted file mode 100644 index 18610bf..0000000 --- a/typescript/src/models/EnvClusterInfo.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ClusterDTO } from './ClusterDTO'; -import { - ClusterDTOFromJSON, - ClusterDTOFromJSONTyped, - ClusterDTOToJSON, - ClusterDTOToJSONTyped, -} from './ClusterDTO'; - -/** - * - * @export - * @interface EnvClusterInfo - */ -export interface EnvClusterInfo { - /** - * - * @type {string} - * @memberof EnvClusterInfo - */ - env?: string; - /** - * - * @type {Array} - * @memberof EnvClusterInfo - */ - clusters?: Array; -} - -/** - * Check if a given object implements the EnvClusterInfo interface. - */ -export function instanceOfEnvClusterInfo(value: object): value is EnvClusterInfo { - return true; -} - -export function EnvClusterInfoFromJSON(json: any): EnvClusterInfo { - return EnvClusterInfoFromJSONTyped(json, false); -} - -export function EnvClusterInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnvClusterInfo { - if (json == null) { - return json; - } - return { - - 'env': json['env'] == null ? undefined : json['env'], - 'clusters': json['clusters'] == null ? undefined : ((json['clusters'] as Array).map(ClusterDTOFromJSON)), - }; -} - -export function EnvClusterInfoToJSON(json: any): EnvClusterInfo { - return EnvClusterInfoToJSONTyped(json, false); -} - -export function EnvClusterInfoToJSONTyped(value?: EnvClusterInfo | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'env': value['env'], - 'clusters': value['clusters'] == null ? undefined : ((value['clusters'] as Array).map(ClusterDTOToJSON)), - }; -} - diff --git a/typescript/src/models/ItemChangeSets.ts b/typescript/src/models/ItemChangeSets.ts deleted file mode 100644 index 34d8f64..0000000 --- a/typescript/src/models/ItemChangeSets.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ItemDTO } from './ItemDTO'; -import { - ItemDTOFromJSON, - ItemDTOFromJSONTyped, - ItemDTOToJSON, - ItemDTOToJSONTyped, -} from './ItemDTO'; - -/** - * - * @export - * @interface ItemChangeSets - */ -export interface ItemChangeSets { - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ItemChangeSets - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {Array} - * @memberof ItemChangeSets - */ - createItems?: Array; - /** - * - * @type {Array} - * @memberof ItemChangeSets - */ - updateItems?: Array; - /** - * - * @type {Array} - * @memberof ItemChangeSets - */ - deleteItems?: Array; -} - -/** - * Check if a given object implements the ItemChangeSets interface. - */ -export function instanceOfItemChangeSets(value: object): value is ItemChangeSets { - return true; -} - -export function ItemChangeSetsFromJSON(json: any): ItemChangeSets { - return ItemChangeSetsFromJSONTyped(json, false); -} - -export function ItemChangeSetsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemChangeSets { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'createItems': json['createItems'] == null ? undefined : ((json['createItems'] as Array).map(ItemDTOFromJSON)), - 'updateItems': json['updateItems'] == null ? undefined : ((json['updateItems'] as Array).map(ItemDTOFromJSON)), - 'deleteItems': json['deleteItems'] == null ? undefined : ((json['deleteItems'] as Array).map(ItemDTOFromJSON)), - }; -} - -export function ItemChangeSetsToJSON(json: any): ItemChangeSets { - return ItemChangeSetsToJSONTyped(json, false); -} - -export function ItemChangeSetsToJSONTyped(value?: ItemChangeSets | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'createItems': value['createItems'] == null ? undefined : ((value['createItems'] as Array).map(ItemDTOToJSON)), - 'updateItems': value['updateItems'] == null ? undefined : ((value['updateItems'] as Array).map(ItemDTOToJSON)), - 'deleteItems': value['deleteItems'] == null ? undefined : ((value['deleteItems'] as Array).map(ItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/ItemDTO.ts b/typescript/src/models/ItemDTO.ts deleted file mode 100644 index 1b86f46..0000000 --- a/typescript/src/models/ItemDTO.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ItemDTO - */ -export interface ItemDTO { - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof ItemDTO - */ - id?: number; - /** - * - * @type {number} - * @memberof ItemDTO - */ - namespaceId?: number; - /** - * - * @type {string} - * @memberof ItemDTO - */ - key?: string; - /** - * - * @type {number} - * @memberof ItemDTO - */ - type?: number; - /** - * - * @type {string} - * @memberof ItemDTO - */ - value?: string; - /** - * - * @type {string} - * @memberof ItemDTO - */ - comment?: string; - /** - * - * @type {number} - * @memberof ItemDTO - */ - lineNum?: number; -} - -/** - * Check if a given object implements the ItemDTO interface. - */ -export function instanceOfItemDTO(value: object): value is ItemDTO { - return true; -} - -export function ItemDTOFromJSON(json: any): ItemDTO { - return ItemDTOFromJSONTyped(json, false); -} - -export function ItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'namespaceId': json['namespaceId'] == null ? undefined : json['namespaceId'], - 'key': json['key'] == null ? undefined : json['key'], - 'type': json['type'] == null ? undefined : json['type'], - 'value': json['value'] == null ? undefined : json['value'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'lineNum': json['lineNum'] == null ? undefined : json['lineNum'], - }; -} - -export function ItemDTOToJSON(json: any): ItemDTO { - return ItemDTOToJSONTyped(json, false); -} - -export function ItemDTOToJSONTyped(value?: ItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'namespaceId': value['namespaceId'], - 'key': value['key'], - 'type': value['type'], - 'value': value['value'], - 'comment': value['comment'], - 'lineNum': value['lineNum'], - }; -} - diff --git a/typescript/src/models/KVEntity.ts b/typescript/src/models/KVEntity.ts deleted file mode 100644 index bee5252..0000000 --- a/typescript/src/models/KVEntity.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface KVEntity - */ -export interface KVEntity { - /** - * - * @type {string} - * @memberof KVEntity - */ - key?: string; - /** - * - * @type {string} - * @memberof KVEntity - */ - value?: string; -} - -/** - * Check if a given object implements the KVEntity interface. - */ -export function instanceOfKVEntity(value: object): value is KVEntity { - return true; -} - -export function KVEntityFromJSON(json: any): KVEntity { - return KVEntityFromJSONTyped(json, false); -} - -export function KVEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): KVEntity { - if (json == null) { - return json; - } - return { - - 'key': json['key'] == null ? undefined : json['key'], - 'value': json['value'] == null ? undefined : json['value'], - }; -} - -export function KVEntityToJSON(json: any): KVEntity { - return KVEntityToJSONTyped(json, false); -} - -export function KVEntityToJSONTyped(value?: KVEntity | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'key': value['key'], - 'value': value['value'], - }; -} - diff --git a/typescript/src/models/ListItemDiffs.ts b/typescript/src/models/ListItemDiffs.ts deleted file mode 100644 index 610128c..0000000 --- a/typescript/src/models/ListItemDiffs.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { NamespaceIdentifier } from './NamespaceIdentifier'; -import { - NamespaceIdentifierFromJSON, - NamespaceIdentifierFromJSONTyped, - NamespaceIdentifierToJSON, - NamespaceIdentifierToJSONTyped, -} from './NamespaceIdentifier'; -import type { ItemChangeSets } from './ItemChangeSets'; -import { - ItemChangeSetsFromJSON, - ItemChangeSetsFromJSONTyped, - ItemChangeSetsToJSON, - ItemChangeSetsToJSONTyped, -} from './ItemChangeSets'; - -/** - * - * @export - * @interface ListItemDiffs - */ -export interface ListItemDiffs { - /** - * - * @type {NamespaceIdentifier} - * @memberof ListItemDiffs - */ - namespace?: NamespaceIdentifier; - /** - * - * @type {ItemChangeSets} - * @memberof ListItemDiffs - */ - diffs?: ItemChangeSets; - /** - * - * @type {string} - * @memberof ListItemDiffs - */ - extInfo?: string; -} - -/** - * Check if a given object implements the ListItemDiffs interface. - */ -export function instanceOfListItemDiffs(value: object): value is ListItemDiffs { - return true; -} - -export function ListItemDiffsFromJSON(json: any): ListItemDiffs { - return ListItemDiffsFromJSONTyped(json, false); -} - -export function ListItemDiffsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListItemDiffs { - if (json == null) { - return json; - } - return { - - 'namespace': json['namespace'] == null ? undefined : NamespaceIdentifierFromJSON(json['namespace']), - 'diffs': json['diffs'] == null ? undefined : ItemChangeSetsFromJSON(json['diffs']), - 'extInfo': json['extInfo'] == null ? undefined : json['extInfo'], - }; -} - -export function ListItemDiffsToJSON(json: any): ListItemDiffs { - return ListItemDiffsToJSONTyped(json, false); -} - -export function ListItemDiffsToJSONTyped(value?: ListItemDiffs | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'namespace': NamespaceIdentifierToJSON(value['namespace']), - 'diffs': ItemChangeSetsToJSON(value['diffs']), - 'extInfo': value['extInfo'], - }; -} - diff --git a/typescript/src/models/ListReleaseBO.ts b/typescript/src/models/ListReleaseBO.ts deleted file mode 100644 index 919b187..0000000 --- a/typescript/src/models/ListReleaseBO.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ReleaseDTO } from './ReleaseDTO'; -import { - ReleaseDTOFromJSON, - ReleaseDTOFromJSONTyped, - ReleaseDTOToJSON, - ReleaseDTOToJSONTyped, -} from './ReleaseDTO'; -import type { KVEntity } from './KVEntity'; -import { - KVEntityFromJSON, - KVEntityFromJSONTyped, - KVEntityToJSON, - KVEntityToJSONTyped, -} from './KVEntity'; - -/** - * - * @export - * @interface ListReleaseBO - */ -export interface ListReleaseBO { - /** - * - * @type {ReleaseDTO} - * @memberof ListReleaseBO - */ - baseInfo?: ReleaseDTO; - /** - * - * @type {Array} - * @memberof ListReleaseBO - */ - items?: Array; -} - -/** - * Check if a given object implements the ListReleaseBO interface. - */ -export function instanceOfListReleaseBO(value: object): value is ListReleaseBO { - return true; -} - -export function ListReleaseBOFromJSON(json: any): ListReleaseBO { - return ListReleaseBOFromJSONTyped(json, false); -} - -export function ListReleaseBOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListReleaseBO { - if (json == null) { - return json; - } - return { - - 'baseInfo': json['baseInfo'] == null ? undefined : ReleaseDTOFromJSON(json['baseInfo']), - 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(KVEntityFromJSON)), - }; -} - -export function ListReleaseBOToJSON(json: any): ListReleaseBO { - return ListReleaseBOToJSONTyped(json, false); -} - -export function ListReleaseBOToJSONTyped(value?: ListReleaseBO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'baseInfo': ReleaseDTOToJSON(value['baseInfo']), - 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(KVEntityToJSON)), - }; -} - diff --git a/typescript/src/models/MapString.ts b/typescript/src/models/MapString.ts deleted file mode 100644 index 51797b9..0000000 --- a/typescript/src/models/MapString.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * 字符串映射对象,用于表示键值对的配置数据结构 - * @export - * @interface MapString - */ -export interface MapString { - /** - * - * @type {string} - * @memberof MapString - */ - key?: string; -} - -/** - * Check if a given object implements the MapString interface. - */ -export function instanceOfMapString(value: object): value is MapString { - return true; -} - -export function MapStringFromJSON(json: any): MapString { - return MapStringFromJSONTyped(json, false); -} - -export function MapStringFromJSONTyped(json: any, ignoreDiscriminator: boolean): MapString { - if (json == null) { - return json; - } - return { - - 'key': json['key'] == null ? undefined : json['key'], - }; -} - -export function MapStringToJSON(json: any): MapString { - return MapStringToJSONTyped(json, false); -} - -export function MapStringToJSONTyped(value?: MapString | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'key': value['key'], - }; -} - diff --git a/typescript/src/models/NamespaceGrayDelReleaseDTO.ts b/typescript/src/models/NamespaceGrayDelReleaseDTO.ts deleted file mode 100644 index 8e51a44..0000000 --- a/typescript/src/models/NamespaceGrayDelReleaseDTO.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - * @export - * @interface NamespaceGrayDelReleaseDTO - */ -export interface NamespaceGrayDelReleaseDTO { - /** - * 发布标题,用于标识这次灰度删除发布的名称或版本号 - * @type {string} - * @memberof NamespaceGrayDelReleaseDTO - */ - releaseTitle?: string; - /** - * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - * @type {string} - * @memberof NamespaceGrayDelReleaseDTO - */ - releaseComment?: string; - /** - * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - * @type {string} - * @memberof NamespaceGrayDelReleaseDTO - */ - releasedBy?: string; - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @type {boolean} - * @memberof NamespaceGrayDelReleaseDTO - */ - isEmergencyPublish?: boolean; - /** - * 需要在灰度发布中删除的配置项键名列表 - * @type {Array} - * @memberof NamespaceGrayDelReleaseDTO - */ - grayDelKeys?: Array; -} - -/** - * Check if a given object implements the NamespaceGrayDelReleaseDTO interface. - */ -export function instanceOfNamespaceGrayDelReleaseDTO(value: object): value is NamespaceGrayDelReleaseDTO { - return true; -} - -export function NamespaceGrayDelReleaseDTOFromJSON(json: any): NamespaceGrayDelReleaseDTO { - return NamespaceGrayDelReleaseDTOFromJSONTyped(json, false); -} - -export function NamespaceGrayDelReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceGrayDelReleaseDTO { - if (json == null) { - return json; - } - return { - - 'releaseTitle': json['releaseTitle'] == null ? undefined : json['releaseTitle'], - 'releaseComment': json['releaseComment'] == null ? undefined : json['releaseComment'], - 'releasedBy': json['releasedBy'] == null ? undefined : json['releasedBy'], - 'isEmergencyPublish': json['isEmergencyPublish'] == null ? undefined : json['isEmergencyPublish'], - 'grayDelKeys': json['grayDelKeys'] == null ? undefined : json['grayDelKeys'], - }; -} - -export function NamespaceGrayDelReleaseDTOToJSON(json: any): NamespaceGrayDelReleaseDTO { - return NamespaceGrayDelReleaseDTOToJSONTyped(json, false); -} - -export function NamespaceGrayDelReleaseDTOToJSONTyped(value?: NamespaceGrayDelReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'releaseTitle': value['releaseTitle'], - 'releaseComment': value['releaseComment'], - 'releasedBy': value['releasedBy'], - 'isEmergencyPublish': value['isEmergencyPublish'], - 'grayDelKeys': value['grayDelKeys'], - }; -} - diff --git a/typescript/src/models/NamespaceIdentifier.ts b/typescript/src/models/NamespaceIdentifier.ts deleted file mode 100644 index e2fe8fc..0000000 --- a/typescript/src/models/NamespaceIdentifier.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface NamespaceIdentifier - */ -export interface NamespaceIdentifier { - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - appId?: string; - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - env?: string; - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof NamespaceIdentifier - */ - namespaceName?: string; -} - -/** - * Check if a given object implements the NamespaceIdentifier interface. - */ -export function instanceOfNamespaceIdentifier(value: object): value is NamespaceIdentifier { - return true; -} - -export function NamespaceIdentifierFromJSON(json: any): NamespaceIdentifier { - return NamespaceIdentifierFromJSONTyped(json, false); -} - -export function NamespaceIdentifierFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceIdentifier { - if (json == null) { - return json; - } - return { - - 'appId': json['appId'] == null ? undefined : json['appId'], - 'env': json['env'] == null ? undefined : json['env'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - }; -} - -export function NamespaceIdentifierToJSON(json: any): NamespaceIdentifier { - return NamespaceIdentifierToJSONTyped(json, false); -} - -export function NamespaceIdentifierToJSONTyped(value?: NamespaceIdentifier | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'appId': value['appId'], - 'env': value['env'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - }; -} - diff --git a/typescript/src/models/NamespaceReleaseDTO.ts b/typescript/src/models/NamespaceReleaseDTO.ts deleted file mode 100644 index a9aeaf4..0000000 --- a/typescript/src/models/NamespaceReleaseDTO.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * 命名空间发布请求数据传输对象,用于创建新的配置发布 - * @export - * @interface NamespaceReleaseDTO - */ -export interface NamespaceReleaseDTO { - /** - * 发布标题,用于标识这次发布的名称或版本号 - * @type {string} - * @memberof NamespaceReleaseDTO - */ - releaseTitle?: string; - /** - * 发布备注,详细描述本次发布的变更内容和目的 - * @type {string} - * @memberof NamespaceReleaseDTO - */ - releaseComment?: string; - /** - * 发布操作者用户名,记录是谁执行了这次发布操作 - * @type {string} - * @memberof NamespaceReleaseDTO - */ - releasedBy?: string; - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @type {boolean} - * @memberof NamespaceReleaseDTO - */ - isEmergencyPublish?: boolean; -} - -/** - * Check if a given object implements the NamespaceReleaseDTO interface. - */ -export function instanceOfNamespaceReleaseDTO(value: object): value is NamespaceReleaseDTO { - return true; -} - -export function NamespaceReleaseDTOFromJSON(json: any): NamespaceReleaseDTO { - return NamespaceReleaseDTOFromJSONTyped(json, false); -} - -export function NamespaceReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceReleaseDTO { - if (json == null) { - return json; - } - return { - - 'releaseTitle': json['releaseTitle'] == null ? undefined : json['releaseTitle'], - 'releaseComment': json['releaseComment'] == null ? undefined : json['releaseComment'], - 'releasedBy': json['releasedBy'] == null ? undefined : json['releasedBy'], - 'isEmergencyPublish': json['isEmergencyPublish'] == null ? undefined : json['isEmergencyPublish'], - }; -} - -export function NamespaceReleaseDTOToJSON(json: any): NamespaceReleaseDTO { - return NamespaceReleaseDTOToJSONTyped(json, false); -} - -export function NamespaceReleaseDTOToJSONTyped(value?: NamespaceReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'releaseTitle': value['releaseTitle'], - 'releaseComment': value['releaseComment'], - 'releasedBy': value['releasedBy'], - 'isEmergencyPublish': value['isEmergencyPublish'], - }; -} - diff --git a/typescript/src/models/NamespaceSyncModel.ts b/typescript/src/models/NamespaceSyncModel.ts deleted file mode 100644 index a69bfed..0000000 --- a/typescript/src/models/NamespaceSyncModel.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { NamespaceIdentifier } from './NamespaceIdentifier'; -import { - NamespaceIdentifierFromJSON, - NamespaceIdentifierFromJSONTyped, - NamespaceIdentifierToJSON, - NamespaceIdentifierToJSONTyped, -} from './NamespaceIdentifier'; -import type { ItemDTO } from './ItemDTO'; -import { - ItemDTOFromJSON, - ItemDTOFromJSONTyped, - ItemDTOToJSON, - ItemDTOToJSONTyped, -} from './ItemDTO'; - -/** - * - * @export - * @interface NamespaceSyncModel - */ -export interface NamespaceSyncModel { - /** - * - * @type {Array} - * @memberof NamespaceSyncModel - */ - syncToNamespaces?: Array; - /** - * - * @type {Array} - * @memberof NamespaceSyncModel - */ - syncItems?: Array; -} - -/** - * Check if a given object implements the NamespaceSyncModel interface. - */ -export function instanceOfNamespaceSyncModel(value: object): value is NamespaceSyncModel { - return true; -} - -export function NamespaceSyncModelFromJSON(json: any): NamespaceSyncModel { - return NamespaceSyncModelFromJSONTyped(json, false); -} - -export function NamespaceSyncModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceSyncModel { - if (json == null) { - return json; - } - return { - - 'syncToNamespaces': json['syncToNamespaces'] == null ? undefined : ((json['syncToNamespaces'] as Array).map(NamespaceIdentifierFromJSON)), - 'syncItems': json['syncItems'] == null ? undefined : ((json['syncItems'] as Array).map(ItemDTOFromJSON)), - }; -} - -export function NamespaceSyncModelToJSON(json: any): NamespaceSyncModel { - return NamespaceSyncModelToJSONTyped(json, false); -} - -export function NamespaceSyncModelToJSONTyped(value?: NamespaceSyncModel | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'syncToNamespaces': value['syncToNamespaces'] == null ? undefined : ((value['syncToNamespaces'] as Array).map(NamespaceIdentifierToJSON)), - 'syncItems': value['syncItems'] == null ? undefined : ((value['syncItems'] as Array).map(ItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/NamespaceTextModel.ts b/typescript/src/models/NamespaceTextModel.ts deleted file mode 100644 index 797397b..0000000 --- a/typescript/src/models/NamespaceTextModel.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface NamespaceTextModel - */ -export interface NamespaceTextModel { - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - appId?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - env?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - namespaceName?: string; - /** - * - * @type {number} - * @memberof NamespaceTextModel - */ - namespaceId?: number; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - format?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - configText?: string; - /** - * - * @type {string} - * @memberof NamespaceTextModel - */ - operator?: string; -} - -/** - * Check if a given object implements the NamespaceTextModel interface. - */ -export function instanceOfNamespaceTextModel(value: object): value is NamespaceTextModel { - return true; -} - -export function NamespaceTextModelFromJSON(json: any): NamespaceTextModel { - return NamespaceTextModelFromJSONTyped(json, false); -} - -export function NamespaceTextModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceTextModel { - if (json == null) { - return json; - } - return { - - 'appId': json['appId'] == null ? undefined : json['appId'], - 'env': json['env'] == null ? undefined : json['env'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'namespaceId': json['namespaceId'] == null ? undefined : json['namespaceId'], - 'format': json['format'] == null ? undefined : json['format'], - 'configText': json['configText'] == null ? undefined : json['configText'], - 'operator': json['operator'] == null ? undefined : json['operator'], - }; -} - -export function NamespaceTextModelToJSON(json: any): NamespaceTextModel { - return NamespaceTextModelToJSONTyped(json, false); -} - -export function NamespaceTextModelToJSONTyped(value?: NamespaceTextModel | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'appId': value['appId'], - 'env': value['env'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'namespaceId': value['namespaceId'], - 'format': value['format'], - 'configText': value['configText'], - 'operator': value['operator'], - }; -} - diff --git a/typescript/src/models/OpenAppDTO.ts b/typescript/src/models/OpenAppDTO.ts deleted file mode 100644 index 70c8535..0000000 --- a/typescript/src/models/OpenAppDTO.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - * @export - * @interface OpenAppDTO - */ -export interface OpenAppDTO { - /** - * 数据创建者用户名,记录是谁创建了这个应用 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeCreatedBy?: string; - /** - * 数据最后修改者用户名,记录最后一次修改应用信息的用户 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 数据创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeCreatedTime?: string; - /** - * 数据最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 应用名称,用于显示的友好名称 - * @type {string} - * @memberof OpenAppDTO - */ - name?: string; - /** - * 应用唯一标识符,全局唯一的应用ID - * @type {string} - * @memberof OpenAppDTO - */ - appId?: string; - /** - * 组织ID,应用所属组织的唯一标识 - * @type {string} - * @memberof OpenAppDTO - */ - orgId?: string; - /** - * 组织名称,应用所属组织的显示名称 - * @type {string} - * @memberof OpenAppDTO - */ - orgName?: string; - /** - * 应用负责人姓名,应用的主要负责人 - * @type {string} - * @memberof OpenAppDTO - */ - ownerName?: string; - /** - * 应用负责人邮箱地址,用于接收应用相关通知 - * @type {string} - * @memberof OpenAppDTO - */ - ownerEmail?: string; -} - -/** - * Check if a given object implements the OpenAppDTO interface. - */ -export function instanceOfOpenAppDTO(value: object): value is OpenAppDTO { - return true; -} - -export function OpenAppDTOFromJSON(json: any): OpenAppDTO { - return OpenAppDTOFromJSONTyped(json, false); -} - -export function OpenAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'orgId': json['orgId'] == null ? undefined : json['orgId'], - 'orgName': json['orgName'] == null ? undefined : json['orgName'], - 'ownerName': json['ownerName'] == null ? undefined : json['ownerName'], - 'ownerEmail': json['ownerEmail'] == null ? undefined : json['ownerEmail'], - }; -} - -export function OpenAppDTOToJSON(json: any): OpenAppDTO { - return OpenAppDTOToJSONTyped(json, false); -} - -export function OpenAppDTOToJSONTyped(value?: OpenAppDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'name': value['name'], - 'appId': value['appId'], - 'orgId': value['orgId'], - 'orgName': value['orgName'], - 'ownerName': value['ownerName'], - 'ownerEmail': value['ownerEmail'], - }; -} - diff --git a/typescript/src/models/OpenAppNamespaceDTO.ts b/typescript/src/models/OpenAppNamespaceDTO.ts deleted file mode 100644 index bb75050..0000000 --- a/typescript/src/models/OpenAppNamespaceDTO.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - * @export - * @interface OpenAppNamespaceDTO - */ -export interface OpenAppNamespaceDTO { - /** - * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeCreatedBy?: string; - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 命名空间创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeCreatedTime?: string; - /** - * 命名空间最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 命名空间名称,在同一应用内唯一标识一个命名空间 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - name?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - appId?: string; - /** - * 命名空间格式类型,如properties、xml、json、yml等 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - format?: string; - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @type {boolean} - * @memberof OpenAppNamespaceDTO - */ - isPublic?: boolean; - /** - * 对于公共命名空间,是否在命名空间名称前添加前缀 - * @type {boolean} - * @memberof OpenAppNamespaceDTO - */ - appendNamespacePrefix?: boolean; - /** - * 命名空间备注说明,描述命名空间的用途和包含的配置类型 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenAppNamespaceDTO interface. - */ -export function instanceOfOpenAppNamespaceDTO(value: object): value is OpenAppNamespaceDTO { - return true; -} - -export function OpenAppNamespaceDTOFromJSON(json: any): OpenAppNamespaceDTO { - return OpenAppNamespaceDTOFromJSONTyped(json, false); -} - -export function OpenAppNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppNamespaceDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'format': json['format'] == null ? undefined : json['format'], - 'isPublic': json['isPublic'] == null ? undefined : json['isPublic'], - 'appendNamespacePrefix': json['appendNamespacePrefix'] == null ? undefined : json['appendNamespacePrefix'], - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} - -export function OpenAppNamespaceDTOToJSON(json: any): OpenAppNamespaceDTO { - return OpenAppNamespaceDTOToJSONTyped(json, false); -} - -export function OpenAppNamespaceDTOToJSONTyped(value?: OpenAppNamespaceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'name': value['name'], - 'appId': value['appId'], - 'format': value['format'], - 'isPublic': value['isPublic'], - 'appendNamespacePrefix': value['appendNamespacePrefix'], - 'comment': value['comment'], - }; -} - diff --git a/typescript/src/models/OpenClusterDTO.ts b/typescript/src/models/OpenClusterDTO.ts deleted file mode 100644 index 27a1430..0000000 --- a/typescript/src/models/OpenClusterDTO.ts +++ /dev/null @@ -1,105 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - * @export - * @interface OpenClusterDTO - */ -export interface OpenClusterDTO { - /** - * 集群创建者用户名,记录是谁创建了这个集群 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeCreatedBy?: string; - /** - * 集群最后修改者用户名,记录最后一次修改集群信息的用户 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 集群创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeCreatedTime?: string; - /** - * 集群最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 集群名称,在同一应用和环境下唯一标识一个集群 - * @type {string} - * @memberof OpenClusterDTO - */ - name?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenClusterDTO - */ - appId?: string; -} - -/** - * Check if a given object implements the OpenClusterDTO interface. - */ -export function instanceOfOpenClusterDTO(value: object): value is OpenClusterDTO { - return true; -} - -export function OpenClusterDTOFromJSON(json: any): OpenClusterDTO { - return OpenClusterDTOFromJSONTyped(json, false); -} - -export function OpenClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenClusterDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - }; -} - -export function OpenClusterDTOToJSON(json: any): OpenClusterDTO { - return OpenClusterDTOToJSONTyped(json, false); -} - -export function OpenClusterDTOToJSONTyped(value?: OpenClusterDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'name': value['name'], - 'appId': value['appId'], - }; -} - diff --git a/typescript/src/models/OpenCreateAppDTO.ts b/typescript/src/models/OpenCreateAppDTO.ts deleted file mode 100644 index 3700d47..0000000 --- a/typescript/src/models/OpenCreateAppDTO.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenAppDTO } from './OpenAppDTO'; -import { - OpenAppDTOFromJSON, - OpenAppDTOFromJSONTyped, - OpenAppDTOToJSON, - OpenAppDTOToJSONTyped, -} from './OpenAppDTO'; - -/** - * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - * @export - * @interface OpenCreateAppDTO - */ -export interface OpenCreateAppDTO { - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @type {boolean} - * @memberof OpenCreateAppDTO - */ - assignAppRoleToSelf?: boolean; - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @type {Array} - * @memberof OpenCreateAppDTO - */ - admins?: Array; - /** - * - * @type {OpenAppDTO} - * @memberof OpenCreateAppDTO - */ - app?: OpenAppDTO; -} - -/** - * Check if a given object implements the OpenCreateAppDTO interface. - */ -export function instanceOfOpenCreateAppDTO(value: object): value is OpenCreateAppDTO { - return true; -} - -export function OpenCreateAppDTOFromJSON(json: any): OpenCreateAppDTO { - return OpenCreateAppDTOFromJSONTyped(json, false); -} - -export function OpenCreateAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenCreateAppDTO { - if (json == null) { - return json; - } - return { - - 'assignAppRoleToSelf': json['assignAppRoleToSelf'] == null ? undefined : json['assignAppRoleToSelf'], - 'admins': json['admins'] == null ? undefined : json['admins'], - 'app': json['app'] == null ? undefined : OpenAppDTOFromJSON(json['app']), - }; -} - -export function OpenCreateAppDTOToJSON(json: any): OpenCreateAppDTO { - return OpenCreateAppDTOToJSONTyped(json, false); -} - -export function OpenCreateAppDTOToJSONTyped(value?: OpenCreateAppDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'assignAppRoleToSelf': value['assignAppRoleToSelf'], - 'admins': value['admins'], - 'app': OpenAppDTOToJSON(value['app']), - }; -} - diff --git a/typescript/src/models/OpenEnvClusterDTO.ts b/typescript/src/models/OpenEnvClusterDTO.ts deleted file mode 100644 index e928b99..0000000 --- a/typescript/src/models/OpenEnvClusterDTO.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenEnvClusterDTO - */ -export interface OpenEnvClusterDTO { - /** - * - * @type {string} - * @memberof OpenEnvClusterDTO - */ - env?: string; - /** - * - * @type {Array} - * @memberof OpenEnvClusterDTO - */ - clusters?: Array; -} - -/** - * Check if a given object implements the OpenEnvClusterDTO interface. - */ -export function instanceOfOpenEnvClusterDTO(value: object): value is OpenEnvClusterDTO { - return true; -} - -export function OpenEnvClusterDTOFromJSON(json: any): OpenEnvClusterDTO { - return OpenEnvClusterDTOFromJSONTyped(json, false); -} - -export function OpenEnvClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenEnvClusterDTO { - if (json == null) { - return json; - } - return { - - 'env': json['env'] == null ? undefined : json['env'], - 'clusters': json['clusters'] == null ? undefined : json['clusters'], - }; -} - -export function OpenEnvClusterDTOToJSON(json: any): OpenEnvClusterDTO { - return OpenEnvClusterDTOToJSONTyped(json, false); -} - -export function OpenEnvClusterDTOToJSONTyped(value?: OpenEnvClusterDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'env': value['env'], - 'clusters': value['clusters'], - }; -} - diff --git a/typescript/src/models/OpenGrayReleaseRuleDTO.ts b/typescript/src/models/OpenGrayReleaseRuleDTO.ts deleted file mode 100644 index b1e4464..0000000 --- a/typescript/src/models/OpenGrayReleaseRuleDTO.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenGrayReleaseRuleItemDTO } from './OpenGrayReleaseRuleItemDTO'; -import { - OpenGrayReleaseRuleItemDTOFromJSON, - OpenGrayReleaseRuleItemDTOFromJSONTyped, - OpenGrayReleaseRuleItemDTOToJSON, - OpenGrayReleaseRuleItemDTOToJSONTyped, -} from './OpenGrayReleaseRuleItemDTO'; - -/** - * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - * @export - * @interface OpenGrayReleaseRuleDTO - */ -export interface OpenGrayReleaseRuleDTO { - /** - * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeCreatedBy?: string; - /** - * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 灰度规则创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeCreatedTime?: string; - /** - * 灰度规则最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - appId?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - clusterName?: string; - /** - * 所属命名空间的名称 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - namespaceName?: string; - /** - * 灰度分支名称,标识灰度发布的分支 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - branchName?: string; - /** - * 灰度发布规则项列表,包含具体的灰度规则条件 - * @type {Array} - * @memberof OpenGrayReleaseRuleDTO - */ - ruleItems?: Array; -} - -/** - * Check if a given object implements the OpenGrayReleaseRuleDTO interface. - */ -export function instanceOfOpenGrayReleaseRuleDTO(value: object): value is OpenGrayReleaseRuleDTO { - return true; -} - -export function OpenGrayReleaseRuleDTOFromJSON(json: any): OpenGrayReleaseRuleDTO { - return OpenGrayReleaseRuleDTOFromJSONTyped(json, false); -} - -export function OpenGrayReleaseRuleDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenGrayReleaseRuleDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'branchName': json['branchName'] == null ? undefined : json['branchName'], - 'ruleItems': json['ruleItems'] == null ? undefined : ((json['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOFromJSON)), - }; -} - -export function OpenGrayReleaseRuleDTOToJSON(json: any): OpenGrayReleaseRuleDTO { - return OpenGrayReleaseRuleDTOToJSONTyped(json, false); -} - -export function OpenGrayReleaseRuleDTOToJSONTyped(value?: OpenGrayReleaseRuleDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'branchName': value['branchName'], - 'ruleItems': value['ruleItems'] == null ? undefined : ((value['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts b/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts deleted file mode 100644 index 1f2bd7a..0000000 --- a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - * @export - * @interface OpenGrayReleaseRuleItemDTO - */ -export interface OpenGrayReleaseRuleItemDTO { - /** - * 客户端应用ID,指定哪个应用可以获取灰度配置 - * @type {string} - * @memberof OpenGrayReleaseRuleItemDTO - */ - clientAppId?: string; - /** - * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - * @type {Array} - * @memberof OpenGrayReleaseRuleItemDTO - */ - clientIpList?: Array; - /** - * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - * @type {Array} - * @memberof OpenGrayReleaseRuleItemDTO - */ - clientLabelList?: Array; -} - -/** - * Check if a given object implements the OpenGrayReleaseRuleItemDTO interface. - */ -export function instanceOfOpenGrayReleaseRuleItemDTO(value: object): value is OpenGrayReleaseRuleItemDTO { - return true; -} - -export function OpenGrayReleaseRuleItemDTOFromJSON(json: any): OpenGrayReleaseRuleItemDTO { - return OpenGrayReleaseRuleItemDTOFromJSONTyped(json, false); -} - -export function OpenGrayReleaseRuleItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenGrayReleaseRuleItemDTO { - if (json == null) { - return json; - } - return { - - 'clientAppId': json['clientAppId'] == null ? undefined : json['clientAppId'], - 'clientIpList': json['clientIpList'] == null ? undefined : json['clientIpList'], - 'clientLabelList': json['clientLabelList'] == null ? undefined : json['clientLabelList'], - }; -} - -export function OpenGrayReleaseRuleItemDTOToJSON(json: any): OpenGrayReleaseRuleItemDTO { - return OpenGrayReleaseRuleItemDTOToJSONTyped(json, false); -} - -export function OpenGrayReleaseRuleItemDTOToJSONTyped(value?: OpenGrayReleaseRuleItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'clientAppId': value['clientAppId'], - 'clientIpList': value['clientIpList'], - 'clientLabelList': value['clientLabelList'], - }; -} - diff --git a/typescript/src/models/OpenInstanceConfigDTO.ts b/typescript/src/models/OpenInstanceConfigDTO.ts deleted file mode 100644 index b75eb33..0000000 --- a/typescript/src/models/OpenInstanceConfigDTO.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenReleaseDTO } from './OpenReleaseDTO'; -import { - OpenReleaseDTOFromJSON, - OpenReleaseDTOFromJSONTyped, - OpenReleaseDTOToJSON, - OpenReleaseDTOToJSONTyped, -} from './OpenReleaseDTO'; - -/** - * - * @export - * @interface OpenInstanceConfigDTO - */ -export interface OpenInstanceConfigDTO { - /** - * - * @type {OpenReleaseDTO} - * @memberof OpenInstanceConfigDTO - */ - release?: OpenReleaseDTO; - /** - * - * @type {string} - * @memberof OpenInstanceConfigDTO - */ - releaseDeliveryTime?: string; - /** - * - * @type {string} - * @memberof OpenInstanceConfigDTO - */ - dataChangeLastModifiedTime?: string; -} - -/** - * Check if a given object implements the OpenInstanceConfigDTO interface. - */ -export function instanceOfOpenInstanceConfigDTO(value: object): value is OpenInstanceConfigDTO { - return true; -} - -export function OpenInstanceConfigDTOFromJSON(json: any): OpenInstanceConfigDTO { - return OpenInstanceConfigDTOFromJSONTyped(json, false); -} - -export function OpenInstanceConfigDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstanceConfigDTO { - if (json == null) { - return json; - } - return { - - 'release': json['release'] == null ? undefined : OpenReleaseDTOFromJSON(json['release']), - 'releaseDeliveryTime': json['releaseDeliveryTime'] == null ? undefined : json['releaseDeliveryTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - }; -} - -export function OpenInstanceConfigDTOToJSON(json: any): OpenInstanceConfigDTO { - return OpenInstanceConfigDTOToJSONTyped(json, false); -} - -export function OpenInstanceConfigDTOToJSONTyped(value?: OpenInstanceConfigDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'release': OpenReleaseDTOToJSON(value['release']), - 'releaseDeliveryTime': value['releaseDeliveryTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - }; -} - diff --git a/typescript/src/models/OpenInstanceDTO.ts b/typescript/src/models/OpenInstanceDTO.ts deleted file mode 100644 index 947be20..0000000 --- a/typescript/src/models/OpenInstanceDTO.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenInstanceConfigDTO } from './OpenInstanceConfigDTO'; -import { - OpenInstanceConfigDTOFromJSON, - OpenInstanceConfigDTOFromJSONTyped, - OpenInstanceConfigDTOToJSON, - OpenInstanceConfigDTOToJSONTyped, -} from './OpenInstanceConfigDTO'; - -/** - * - * @export - * @interface OpenInstanceDTO - */ -export interface OpenInstanceDTO { - /** - * - * @type {number} - * @memberof OpenInstanceDTO - */ - id?: number; - /** - * - * @type {string} - * @memberof OpenInstanceDTO - */ - appId?: string; - /** - * - * @type {string} - * @memberof OpenInstanceDTO - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof OpenInstanceDTO - */ - dataCenter?: string; - /** - * - * @type {string} - * @memberof OpenInstanceDTO - */ - ip?: string; - /** - * - * @type {Array} - * @memberof OpenInstanceDTO - */ - configs?: Array; - /** - * - * @type {string} - * @memberof OpenInstanceDTO - */ - dataChangeCreatedTime?: string; -} - -/** - * Check if a given object implements the OpenInstanceDTO interface. - */ -export function instanceOfOpenInstanceDTO(value: object): value is OpenInstanceDTO { - return true; -} - -export function OpenInstanceDTOFromJSON(json: any): OpenInstanceDTO { - return OpenInstanceDTOFromJSONTyped(json, false); -} - -export function OpenInstanceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstanceDTO { - if (json == null) { - return json; - } - return { - - 'id': json['id'] == null ? undefined : json['id'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'dataCenter': json['dataCenter'] == null ? undefined : json['dataCenter'], - 'ip': json['ip'] == null ? undefined : json['ip'], - 'configs': json['configs'] == null ? undefined : ((json['configs'] as Array).map(OpenInstanceConfigDTOFromJSON)), - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - }; -} - -export function OpenInstanceDTOToJSON(json: any): OpenInstanceDTO { - return OpenInstanceDTOToJSONTyped(json, false); -} - -export function OpenInstanceDTOToJSONTyped(value?: OpenInstanceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'dataCenter': value['dataCenter'], - 'ip': value['ip'], - 'configs': value['configs'] == null ? undefined : ((value['configs'] as Array).map(OpenInstanceConfigDTOToJSON)), - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - }; -} - diff --git a/typescript/src/models/OpenItemDTO.ts b/typescript/src/models/OpenItemDTO.ts deleted file mode 100644 index 1cfd977..0000000 --- a/typescript/src/models/OpenItemDTO.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - * @export - * @interface OpenItemDTO - */ -export interface OpenItemDTO { - /** - * 配置项创建者用户名,记录是谁创建了这个配置项 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeCreatedBy?: string; - /** - * 配置项最后修改者用户名,记录最后一次修改配置的用户 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 配置项创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeCreatedTime?: string; - /** - * 配置项最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @type {string} - * @memberof OpenItemDTO - */ - key?: string; - /** - * 配置项类型,0表示普通配置项,1表示文件类型配置项 - * @type {number} - * @memberof OpenItemDTO - */ - type?: number; - /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @type {string} - * @memberof OpenItemDTO - */ - value?: string; - /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @type {string} - * @memberof OpenItemDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenItemDTO interface. - */ -export function instanceOfOpenItemDTO(value: object): value is OpenItemDTO { - return true; -} - -export function OpenItemDTOFromJSON(json: any): OpenItemDTO { - return OpenItemDTOFromJSONTyped(json, false); -} - -export function OpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'key': json['key'] == null ? undefined : json['key'], - 'type': json['type'] == null ? undefined : json['type'], - 'value': json['value'] == null ? undefined : json['value'], - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} - -export function OpenItemDTOToJSON(json: any): OpenItemDTO { - return OpenItemDTOToJSONTyped(json, false); -} - -export function OpenItemDTOToJSONTyped(value?: OpenItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'key': value['key'], - 'type': value['type'], - 'value': value['value'], - 'comment': value['comment'], - }; -} - diff --git a/typescript/src/models/OpenNamespaceDTO.ts b/typescript/src/models/OpenNamespaceDTO.ts deleted file mode 100644 index 07fce28..0000000 --- a/typescript/src/models/OpenNamespaceDTO.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenItemDTO } from './OpenItemDTO'; -import { - OpenItemDTOFromJSON, - OpenItemDTOFromJSONTyped, - OpenItemDTOToJSON, - OpenItemDTOToJSONTyped, -} from './OpenItemDTO'; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - * @export - * @interface OpenNamespaceDTO - */ -export interface OpenNamespaceDTO { - /** - * 命名空间创建者用户名,记录是谁创建了这个命名空间 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeCreatedBy?: string; - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 命名空间创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeCreatedTime?: string; - /** - * 命名空间最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenNamespaceDTO - */ - appId?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenNamespaceDTO - */ - clusterName?: string; - /** - * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - * @type {string} - * @memberof OpenNamespaceDTO - */ - namespaceName?: string; - /** - * 命名空间备注说明,描述命名空间的用途 - * @type {string} - * @memberof OpenNamespaceDTO - */ - comment?: string; - /** - * 命名空间格式类型,如properties、xml、json、yml等 - * @type {string} - * @memberof OpenNamespaceDTO - */ - format?: string; - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @type {boolean} - * @memberof OpenNamespaceDTO - */ - isPublic?: boolean; - /** - * 命名空间包含的配置项列表 - * @type {Array} - * @memberof OpenNamespaceDTO - */ - items?: Array; -} - -/** - * Check if a given object implements the OpenNamespaceDTO interface. - */ -export function instanceOfOpenNamespaceDTO(value: object): value is OpenNamespaceDTO { - return true; -} - -export function OpenNamespaceDTOFromJSON(json: any): OpenNamespaceDTO { - return OpenNamespaceDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'format': json['format'] == null ? undefined : json['format'], - 'isPublic': json['isPublic'] == null ? undefined : json['isPublic'], - 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(OpenItemDTOFromJSON)), - }; -} - -export function OpenNamespaceDTOToJSON(json: any): OpenNamespaceDTO { - return OpenNamespaceDTOToJSONTyped(json, false); -} - -export function OpenNamespaceDTOToJSONTyped(value?: OpenNamespaceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'comment': value['comment'], - 'format': value['format'], - 'isPublic': value['isPublic'], - 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(OpenItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/OpenNamespaceLockDTO.ts b/typescript/src/models/OpenNamespaceLockDTO.ts deleted file mode 100644 index c1b75f1..0000000 --- a/typescript/src/models/OpenNamespaceLockDTO.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Apollo命名空间锁状态数据传输对象 - * @export - * @interface OpenNamespaceLockDTO - */ -export interface OpenNamespaceLockDTO { - /** - * 命名空间名称 - * @type {string} - * @memberof OpenNamespaceLockDTO - */ - namespaceName?: string; - /** - * 是否被锁定 - * @type {boolean} - * @memberof OpenNamespaceLockDTO - */ - isLocked?: boolean; - /** - * 锁定者用户名 - * @type {string} - * @memberof OpenNamespaceLockDTO - */ - lockedBy?: string; -} - -/** - * Check if a given object implements the OpenNamespaceLockDTO interface. - */ -export function instanceOfOpenNamespaceLockDTO(value: object): value is OpenNamespaceLockDTO { - return true; -} - -export function OpenNamespaceLockDTOFromJSON(json: any): OpenNamespaceLockDTO { - return OpenNamespaceLockDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceLockDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceLockDTO { - if (json == null) { - return json; - } - return { - - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'isLocked': json['isLocked'] == null ? undefined : json['isLocked'], - 'lockedBy': json['lockedBy'] == null ? undefined : json['lockedBy'], - }; -} - -export function OpenNamespaceLockDTOToJSON(json: any): OpenNamespaceLockDTO { - return OpenNamespaceLockDTOToJSONTyped(json, false); -} - -export function OpenNamespaceLockDTOToJSONTyped(value?: OpenNamespaceLockDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'namespaceName': value['namespaceName'], - 'isLocked': value['isLocked'], - 'lockedBy': value['lockedBy'], - }; -} - diff --git a/typescript/src/models/OpenOrganizationDto.ts b/typescript/src/models/OpenOrganizationDto.ts deleted file mode 100644 index fddb3d6..0000000 --- a/typescript/src/models/OpenOrganizationDto.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenOrganizationDto - */ -export interface OpenOrganizationDto { - /** - * - * @type {string} - * @memberof OpenOrganizationDto - */ - orgId?: string; - /** - * - * @type {string} - * @memberof OpenOrganizationDto - */ - orgName?: string; -} - -/** - * Check if a given object implements the OpenOrganizationDto interface. - */ -export function instanceOfOpenOrganizationDto(value: object): value is OpenOrganizationDto { - return true; -} - -export function OpenOrganizationDtoFromJSON(json: any): OpenOrganizationDto { - return OpenOrganizationDtoFromJSONTyped(json, false); -} - -export function OpenOrganizationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenOrganizationDto { - if (json == null) { - return json; - } - return { - - 'orgId': json['orgId'] == null ? undefined : json['orgId'], - 'orgName': json['orgName'] == null ? undefined : json['orgName'], - }; -} - -export function OpenOrganizationDtoToJSON(json: any): OpenOrganizationDto { - return OpenOrganizationDtoToJSONTyped(json, false); -} - -export function OpenOrganizationDtoToJSONTyped(value?: OpenOrganizationDto | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'orgId': value['orgId'], - 'orgName': value['orgName'], - }; -} - diff --git a/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts b/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts deleted file mode 100644 index d3701c9..0000000 --- a/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenInstanceDTO } from './OpenInstanceDTO'; -import { - OpenInstanceDTOFromJSON, - OpenInstanceDTOFromJSONTyped, - OpenInstanceDTOToJSON, - OpenInstanceDTOToJSONTyped, -} from './OpenInstanceDTO'; - -/** - * 分页实例数据传输对象,用于返回分页查询的实例列表结果 - * @export - * @interface OpenPageDTOOpenInstanceDTO - */ -export interface OpenPageDTOOpenInstanceDTO { - /** - * 当前页码,从0开始计数 - * @type {number} - * @memberof OpenPageDTOOpenInstanceDTO - */ - page?: number; - /** - * 每页显示的记录数量 - * @type {number} - * @memberof OpenPageDTOOpenInstanceDTO - */ - size?: number; - /** - * 总记录数,符合查询条件的实例总数量 - * @type {number} - * @memberof OpenPageDTOOpenInstanceDTO - */ - total?: number; - /** - * 当前页的实例列表,包含具体的实例数据 - * @type {Array} - * @memberof OpenPageDTOOpenInstanceDTO - */ - content?: Array; -} - -/** - * Check if a given object implements the OpenPageDTOOpenInstanceDTO interface. - */ -export function instanceOfOpenPageDTOOpenInstanceDTO(value: object): value is OpenPageDTOOpenInstanceDTO { - return true; -} - -export function OpenPageDTOOpenInstanceDTOFromJSON(json: any): OpenPageDTOOpenInstanceDTO { - return OpenPageDTOOpenInstanceDTOFromJSONTyped(json, false); -} - -export function OpenPageDTOOpenInstanceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPageDTOOpenInstanceDTO { - if (json == null) { - return json; - } - return { - - 'page': json['page'] == null ? undefined : json['page'], - 'size': json['size'] == null ? undefined : json['size'], - 'total': json['total'] == null ? undefined : json['total'], - 'content': json['content'] == null ? undefined : ((json['content'] as Array).map(OpenInstanceDTOFromJSON)), - }; -} - -export function OpenPageDTOOpenInstanceDTOToJSON(json: any): OpenPageDTOOpenInstanceDTO { - return OpenPageDTOOpenInstanceDTOToJSONTyped(json, false); -} - -export function OpenPageDTOOpenInstanceDTOToJSONTyped(value?: OpenPageDTOOpenInstanceDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'page': value['page'], - 'size': value['size'], - 'total': value['total'], - 'content': value['content'] == null ? undefined : ((value['content'] as Array).map(OpenInstanceDTOToJSON)), - }; -} - diff --git a/typescript/src/models/OpenPageDTOOpenItemDTO.ts b/typescript/src/models/OpenPageDTOOpenItemDTO.ts deleted file mode 100644 index 9434e11..0000000 --- a/typescript/src/models/OpenPageDTOOpenItemDTO.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenItemDTO } from './OpenItemDTO'; -import { - OpenItemDTOFromJSON, - OpenItemDTOFromJSONTyped, - OpenItemDTOToJSON, - OpenItemDTOToJSONTyped, -} from './OpenItemDTO'; - -/** - * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - * @export - * @interface OpenPageDTOOpenItemDTO - */ -export interface OpenPageDTOOpenItemDTO { - /** - * 当前页码,从0开始计数 - * @type {number} - * @memberof OpenPageDTOOpenItemDTO - */ - page?: number; - /** - * 每页显示的记录数量 - * @type {number} - * @memberof OpenPageDTOOpenItemDTO - */ - size?: number; - /** - * 总记录数,符合查询条件的配置项总数量 - * @type {number} - * @memberof OpenPageDTOOpenItemDTO - */ - total?: number; - /** - * 当前页的配置项列表,包含具体的配置项数据 - * @type {Array} - * @memberof OpenPageDTOOpenItemDTO - */ - content?: Array; -} - -/** - * Check if a given object implements the OpenPageDTOOpenItemDTO interface. - */ -export function instanceOfOpenPageDTOOpenItemDTO(value: object): value is OpenPageDTOOpenItemDTO { - return true; -} - -export function OpenPageDTOOpenItemDTOFromJSON(json: any): OpenPageDTOOpenItemDTO { - return OpenPageDTOOpenItemDTOFromJSONTyped(json, false); -} - -export function OpenPageDTOOpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPageDTOOpenItemDTO { - if (json == null) { - return json; - } - return { - - 'page': json['page'] == null ? undefined : json['page'], - 'size': json['size'] == null ? undefined : json['size'], - 'total': json['total'] == null ? undefined : json['total'], - 'content': json['content'] == null ? undefined : ((json['content'] as Array).map(OpenItemDTOFromJSON)), - }; -} - -export function OpenPageDTOOpenItemDTOToJSON(json: any): OpenPageDTOOpenItemDTO { - return OpenPageDTOOpenItemDTOToJSONTyped(json, false); -} - -export function OpenPageDTOOpenItemDTOToJSONTyped(value?: OpenPageDTOOpenItemDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'page': value['page'], - 'size': value['size'], - 'total': value['total'], - 'content': value['content'] == null ? undefined : ((value['content'] as Array).map(OpenItemDTOToJSON)), - }; -} - diff --git a/typescript/src/models/OpenReleaseDTO.ts b/typescript/src/models/OpenReleaseDTO.ts deleted file mode 100644 index f82b145..0000000 --- a/typescript/src/models/OpenReleaseDTO.ts +++ /dev/null @@ -1,153 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { MapString } from './MapString'; -import { - MapStringFromJSON, - MapStringFromJSONTyped, - MapStringToJSON, - MapStringToJSONTyped, -} from './MapString'; - -/** - * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - * @export - * @interface OpenReleaseDTO - */ -export interface OpenReleaseDTO { - /** - * 发布创建者用户名,记录是谁创建了这次发布 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeCreatedBy?: string; - /** - * 发布最后修改者用户名,记录最后一次修改发布信息的用户 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 发布创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeCreatedTime?: string; - /** - * 发布最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 发布记录的唯一标识符,系统自动生成 - * @type {number} - * @memberof OpenReleaseDTO - */ - id?: number; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenReleaseDTO - */ - appId?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenReleaseDTO - */ - clusterName?: string; - /** - * 所属命名空间的名称 - * @type {string} - * @memberof OpenReleaseDTO - */ - namespaceName?: string; - /** - * 发布名称,用于标识这次发布的版本或描述 - * @type {string} - * @memberof OpenReleaseDTO - */ - name?: string; - /** - * - * @type {MapString} - * @memberof OpenReleaseDTO - */ - configurations?: MapString; - /** - * 发布备注,描述本次发布的变更内容和目的 - * @type {string} - * @memberof OpenReleaseDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenReleaseDTO interface. - */ -export function instanceOfOpenReleaseDTO(value: object): value is OpenReleaseDTO { - return true; -} - -export function OpenReleaseDTOFromJSON(json: any): OpenReleaseDTO { - return OpenReleaseDTOFromJSONTyped(json, false); -} - -export function OpenReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenReleaseDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'name': json['name'] == null ? undefined : json['name'], - 'configurations': json['configurations'] == null ? undefined : MapStringFromJSON(json['configurations']), - 'comment': json['comment'] == null ? undefined : json['comment'], - }; -} - -export function OpenReleaseDTOToJSON(json: any): OpenReleaseDTO { - return OpenReleaseDTOToJSONTyped(json, false); -} - -export function OpenReleaseDTOToJSONTyped(value?: OpenReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'name': value['name'], - 'configurations': MapStringToJSON(value['configurations']), - 'comment': value['comment'], - }; -} - diff --git a/typescript/src/models/OpenapiV1AppsGet401Response.ts b/typescript/src/models/OpenapiV1AppsGet401Response.ts deleted file mode 100644 index 075ba73..0000000 --- a/typescript/src/models/OpenapiV1AppsGet401Response.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1AppsGet401Response - */ -export interface OpenapiV1AppsGet401Response { - /** - * - * @type {string} - * @memberof OpenapiV1AppsGet401Response - */ - message?: string; -} - -/** - * Check if a given object implements the OpenapiV1AppsGet401Response interface. - */ -export function instanceOfOpenapiV1AppsGet401Response(value: object): value is OpenapiV1AppsGet401Response { - return true; -} - -export function OpenapiV1AppsGet401ResponseFromJSON(json: any): OpenapiV1AppsGet401Response { - return OpenapiV1AppsGet401ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1AppsGet401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1AppsGet401Response { - if (json == null) { - return json; - } - return { - - 'message': json['message'] == null ? undefined : json['message'], - }; -} - -export function OpenapiV1AppsGet401ResponseToJSON(json: any): OpenapiV1AppsGet401Response { - return OpenapiV1AppsGet401ResponseToJSONTyped(json, false); -} - -export function OpenapiV1AppsGet401ResponseToJSONTyped(value?: OpenapiV1AppsGet401Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'message': value['message'], - }; -} - diff --git a/typescript/src/models/OpenapiV1AppsPost400Response.ts b/typescript/src/models/OpenapiV1AppsPost400Response.ts deleted file mode 100644 index 9227b29..0000000 --- a/typescript/src/models/OpenapiV1AppsPost400Response.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1AppsPost400Response - */ -export interface OpenapiV1AppsPost400Response { - /** - * - * @type {string} - * @memberof OpenapiV1AppsPost400Response - */ - message?: string; - /** - * - * @type {string} - * @memberof OpenapiV1AppsPost400Response - */ - exception?: string; -} - -/** - * Check if a given object implements the OpenapiV1AppsPost400Response interface. - */ -export function instanceOfOpenapiV1AppsPost400Response(value: object): value is OpenapiV1AppsPost400Response { - return true; -} - -export function OpenapiV1AppsPost400ResponseFromJSON(json: any): OpenapiV1AppsPost400Response { - return OpenapiV1AppsPost400ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1AppsPost400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1AppsPost400Response { - if (json == null) { - return json; - } - return { - - 'message': json['message'] == null ? undefined : json['message'], - 'exception': json['exception'] == null ? undefined : json['exception'], - }; -} - -export function OpenapiV1AppsPost400ResponseToJSON(json: any): OpenapiV1AppsPost400Response { - return OpenapiV1AppsPost400ResponseToJSONTyped(json, false); -} - -export function OpenapiV1AppsPost400ResponseToJSONTyped(value?: OpenapiV1AppsPost400Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'message': value['message'], - 'exception': value['exception'], - }; -} - diff --git a/typescript/src/models/OpenapiV1AppsPostRequest.ts b/typescript/src/models/OpenapiV1AppsPostRequest.ts deleted file mode 100644 index 519eaa2..0000000 --- a/typescript/src/models/OpenapiV1AppsPostRequest.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { OpenAppDTO } from './OpenAppDTO'; -import { - OpenAppDTOFromJSON, - OpenAppDTOFromJSONTyped, - OpenAppDTOToJSON, - OpenAppDTOToJSONTyped, -} from './OpenAppDTO'; - -/** - * - * @export - * @interface OpenapiV1AppsPostRequest - */ -export interface OpenapiV1AppsPostRequest { - /** - * - * @type {OpenAppDTO} - * @memberof OpenapiV1AppsPostRequest - */ - app: OpenAppDTO; - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @type {boolean} - * @memberof OpenapiV1AppsPostRequest - */ - assignAppRoleToSelf: boolean; - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @type {Array} - * @memberof OpenapiV1AppsPostRequest - */ - admins: Array; -} - -/** - * Check if a given object implements the OpenapiV1AppsPostRequest interface. - */ -export function instanceOfOpenapiV1AppsPostRequest(value: object): value is OpenapiV1AppsPostRequest { - if (!('app' in value) || value['app'] === undefined) return false; - if (!('assignAppRoleToSelf' in value) || value['assignAppRoleToSelf'] === undefined) return false; - if (!('admins' in value) || value['admins'] === undefined) return false; - return true; -} - -export function OpenapiV1AppsPostRequestFromJSON(json: any): OpenapiV1AppsPostRequest { - return OpenapiV1AppsPostRequestFromJSONTyped(json, false); -} - -export function OpenapiV1AppsPostRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1AppsPostRequest { - if (json == null) { - return json; - } - return { - - 'app': OpenAppDTOFromJSON(json['app']), - 'assignAppRoleToSelf': json['assignAppRoleToSelf'], - 'admins': json['admins'], - }; -} - -export function OpenapiV1AppsPostRequestToJSON(json: any): OpenapiV1AppsPostRequest { - return OpenapiV1AppsPostRequestToJSONTyped(json, false); -} - -export function OpenapiV1AppsPostRequestToJSONTyped(value?: OpenapiV1AppsPostRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'app': OpenAppDTOToJSON(value['app']), - 'assignAppRoleToSelf': value['assignAppRoleToSelf'], - 'admins': value['admins'], - }; -} - diff --git a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts b/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts deleted file mode 100644 index 559c376..0000000 --- a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - /** - * - * @type {boolean} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - valid?: boolean; - /** - * - * @type {string} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response - */ - message?: string; -} - -/** - * Check if a given object implements the OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response interface. - */ -export function instanceOfOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response(value: object): value is OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - return true; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - if (json == null) { - return json; - } - return { - - 'valid': json['valid'] == null ? undefined : json['valid'], - 'message': json['message'] == null ? undefined : json['message'], - }; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200ResponseToJSONTyped(value?: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'valid': value['valid'], - 'message': value['message'], - }; -} - diff --git a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts b/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts deleted file mode 100644 index 93d3a8f..0000000 --- a/typescript/src/models/OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ -export interface OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - /** - * - * @type {boolean} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - valid?: boolean; - /** - * - * @type {string} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - message?: string; - /** - * - * @type {Array} - * @memberof OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response - */ - errors?: Array; -} - -/** - * Check if a given object implements the OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response interface. - */ -export function instanceOfOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response(value: object): value is OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - return true; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - if (json == null) { - return json; - } - return { - - 'valid': json['valid'] == null ? undefined : json['valid'], - 'message': json['message'] == null ? undefined : json['message'], - 'errors': json['errors'] == null ? undefined : json['errors'], - }; -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSON(json: any): OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response { - return OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400ResponseToJSONTyped(value?: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'valid': value['valid'], - 'message': value['message'], - 'errors': value['errors'], - }; -} - diff --git a/typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts b/typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts deleted file mode 100644 index 7885938..0000000 --- a/typescript/src/models/OpenapiV1EnvsEnvReleasesCompareGet200Response.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { Change } from './Change'; -import { - ChangeFromJSON, - ChangeFromJSONTyped, - ChangeToJSON, - ChangeToJSONTyped, -} from './Change'; - -/** - * - * @export - * @interface OpenapiV1EnvsEnvReleasesCompareGet200Response - */ -export interface OpenapiV1EnvsEnvReleasesCompareGet200Response { - /** - * - * @type {Array} - * @memberof OpenapiV1EnvsEnvReleasesCompareGet200Response - */ - changes?: Array; -} - -/** - * Check if a given object implements the OpenapiV1EnvsEnvReleasesCompareGet200Response interface. - */ -export function instanceOfOpenapiV1EnvsEnvReleasesCompareGet200Response(value: object): value is OpenapiV1EnvsEnvReleasesCompareGet200Response { - return true; -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSON(json: any): OpenapiV1EnvsEnvReleasesCompareGet200Response { - return OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenapiV1EnvsEnvReleasesCompareGet200Response { - if (json == null) { - return json; - } - return { - - 'changes': json['changes'] == null ? undefined : ((json['changes'] as Array).map(ChangeFromJSON)), - }; -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSON(json: any): OpenapiV1EnvsEnvReleasesCompareGet200Response { - return OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSONTyped(json, false); -} - -export function OpenapiV1EnvsEnvReleasesCompareGet200ResponseToJSONTyped(value?: OpenapiV1EnvsEnvReleasesCompareGet200Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'changes': value['changes'] == null ? undefined : ((value['changes'] as Array).map(ChangeToJSON)), - }; -} - diff --git a/typescript/src/models/ReleaseDTO.ts b/typescript/src/models/ReleaseDTO.ts deleted file mode 100644 index 8f5516c..0000000 --- a/typescript/src/models/ReleaseDTO.ts +++ /dev/null @@ -1,177 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ReleaseDTO - */ -export interface ReleaseDTO { - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof ReleaseDTO - */ - id?: number; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - releaseKey?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - name?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - appId?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - clusterName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - namespaceName?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - configurations?: string; - /** - * - * @type {string} - * @memberof ReleaseDTO - */ - comment?: string; - /** - * - * @type {boolean} - * @memberof ReleaseDTO - */ - isAbandoned?: boolean; -} - -/** - * Check if a given object implements the ReleaseDTO interface. - */ -export function instanceOfReleaseDTO(value: object): value is ReleaseDTO { - return true; -} - -export function ReleaseDTOFromJSON(json: any): ReleaseDTO { - return ReleaseDTOFromJSONTyped(json, false); -} - -export function ReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReleaseDTO { - if (json == null) { - return json; - } - return { - - 'dataChangeCreatedBy': json['dataChangeCreatedBy'] == null ? undefined : json['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': json['dataChangeLastModifiedBy'] == null ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': json['dataChangeCreatedByDisplayName'] == null ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': json['dataChangeLastModifiedByDisplayName'] == null ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': json['dataChangeCreatedTime'] == null ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': json['dataChangeLastModifiedTime'] == null ? undefined : json['dataChangeLastModifiedTime'], - 'id': json['id'] == null ? undefined : json['id'], - 'releaseKey': json['releaseKey'] == null ? undefined : json['releaseKey'], - 'name': json['name'] == null ? undefined : json['name'], - 'appId': json['appId'] == null ? undefined : json['appId'], - 'clusterName': json['clusterName'] == null ? undefined : json['clusterName'], - 'namespaceName': json['namespaceName'] == null ? undefined : json['namespaceName'], - 'configurations': json['configurations'] == null ? undefined : json['configurations'], - 'comment': json['comment'] == null ? undefined : json['comment'], - 'isAbandoned': json['isAbandoned'] == null ? undefined : json['isAbandoned'], - }; -} - -export function ReleaseDTOToJSON(json: any): ReleaseDTO { - return ReleaseDTOToJSONTyped(json, false); -} - -export function ReleaseDTOToJSONTyped(value?: ReleaseDTO | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataChangeCreatedBy': value['dataChangeCreatedBy'], - 'dataChangeLastModifiedBy': value['dataChangeLastModifiedBy'], - 'dataChangeCreatedByDisplayName': value['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedByDisplayName': value['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': value['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': value['dataChangeLastModifiedTime'], - 'id': value['id'], - 'releaseKey': value['releaseKey'], - 'name': value['name'], - 'appId': value['appId'], - 'clusterName': value['clusterName'], - 'namespaceName': value['namespaceName'], - 'configurations': value['configurations'], - 'comment': value['comment'], - 'isAbandoned': value['isAbandoned'], - }; -} - diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts deleted file mode 100644 index 220e4b4..0000000 --- a/typescript/src/models/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './Change'; -export * from './ClusterDTO'; -export * from './EntityPairKVEntity'; -export * from './EnvClusterInfo'; -export * from './ItemChangeSets'; -export * from './ItemDTO'; -export * from './KVEntity'; -export * from './ListItemDiffs'; -export * from './ListReleaseBO'; -export * from './MapString'; -export * from './NamespaceGrayDelReleaseDTO'; -export * from './NamespaceIdentifier'; -export * from './NamespaceReleaseDTO'; -export * from './NamespaceSyncModel'; -export * from './NamespaceTextModel'; -export * from './OpenAppDTO'; -export * from './OpenAppNamespaceDTO'; -export * from './OpenClusterDTO'; -export * from './OpenCreateAppDTO'; -export * from './OpenEnvClusterDTO'; -export * from './OpenGrayReleaseRuleDTO'; -export * from './OpenGrayReleaseRuleItemDTO'; -export * from './OpenInstanceConfigDTO'; -export * from './OpenInstanceDTO'; -export * from './OpenItemDTO'; -export * from './OpenNamespaceDTO'; -export * from './OpenNamespaceLockDTO'; -export * from './OpenOrganizationDto'; -export * from './OpenPageDTOOpenInstanceDTO'; -export * from './OpenPageDTOOpenItemDTO'; -export * from './OpenReleaseDTO'; -export * from './OpenapiV1AppsGet401Response'; -export * from './OpenapiV1AppsPost400Response'; -export * from './OpenapiV1AppsPostRequest'; -export * from './OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost200Response'; -export * from './OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidatePost400Response'; -export * from './OpenapiV1EnvsEnvReleasesCompareGet200Response'; -export * from './ReleaseDTO'; diff --git a/typescript/src/runtime.ts b/typescript/src/runtime.ts deleted file mode 100644 index 6dd9e83..0000000 --- a/typescript/src/runtime.ts +++ /dev/null @@ -1,432 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - * Apollo配置中心OpenAPI接口文档 ## 认证方式 所有API接口都需要通过Authorization header进行身份验证。 ### 获取Token的方式: 1. **Portal管理界面获取**: - 登录Apollo Portal管理界面 - 进入\"管理员工具\" -> \"开放平台授权管理\" - 创建第三方应用,获取Token 2. **Token格式**: ``` Authorization: token_value ``` 3. **Token权限**: - Token具有对应应用的读写权限 - 不同Token可能有不同的环境和命名空间权限 - 建议为不同用途创建不同的Token ### 使用示例: ```bash curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\" ``` - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security - accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security - headers?: HTTPHeaders; //header params we want to use on every request - credentials?: RequestCredentials; //value for the credentials param we want to use on each request -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string | Promise) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - let body: any; - if (isFormData(overriddenInit.body) - || (overriddenInit.body instanceof URLSearchParams) - || isBlob(overriddenInit.body)) { - body = overriddenInit.body; - } else if (this.isJsonMime(headers['Content-Type'])) { - body = JSON.stringify(overriddenInit.body); - } else { - body = overriddenInit.body; - } - - const init: RequestInit = { - ...overriddenInit, - body - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function querystring(params: HTTPQuery, prefix: string = ''): string { - return Object.keys(params) - .map(key => querystringSingleKey(key, params[key], prefix)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function exists(json: any, key: string) { - const value = json[key]; - return value !== null && value !== undefined; -} - -export function mapValues(data: any, fn: (item: any) => any) { - const result: { [key: string]: any } = {}; - for (const key of Object.keys(data)) { - result[key] = fn(data[key]); - } - return result; -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json deleted file mode 100644 index 4567ec1..0000000 --- a/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -}