diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index 3937aa2..0528788 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -32,7 +32,11 @@ tags: description: 集群管理相关接口,包括集群的创建、查询、删除等操作 - name: Namespace Management description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 - - name: Namespace Namespace Branch Management + - name: AppNamespace Management + description: AppNamespace管理相关接口,包括创建、查询、删除等操作 + - name: Namespace Lock Management + description: 命名空间锁管理相关接口 + - name: Namespace Branch Management description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 - name: Instance Management description: 实例管理相关接口,包括实例查询、配置生效状态等功能 @@ -632,6 +636,12 @@ paths: schema: type: boolean default: false + - name: operator + in: query + description: '操作人用户名' + required: false + schema: + type: string requestBody: content: application/json: @@ -641,10 +651,6 @@ paths: responses: '200': description: '配置项更新成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: @@ -705,17 +711,12 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: '200': description: '配置项删除成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: get: summary: 获取命名空间下的配置项列表 (original openapi) @@ -843,7 +844,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string requestBody: @@ -881,6 +882,62 @@ paths: application/json: schema: $ref: '#/components/schemas/ExceptionResponse' + put: + summary: 通过文本批量修改配置项 (new added) + operationId: batchUpdateItemsByText + deprecated: false + description: >- + PUT + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: + tags: + - Item Management + parameters: + - name: appId + in: path + description: '' + required: true + schema: + type: string + - name: env + in: path + description: '' + required: true + schema: + type: string + - name: clusterName + in: path + description: '' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '' + required: true + schema: + type: string + - name: operator + in: query + description: '操作人用户名' + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceTextModel' + required: true + responses: + '200': + description: '批量更新配置项成功' + '403': + description: '权限不足' + content: + application/json: + schema: + $ref: '#/components/schemas/ExceptionResponse' + headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: get: summary: 通过查询参数获取配置项(支持编码的key) (original openapi) @@ -989,6 +1046,12 @@ paths: schema: type: boolean default: false + - name: operator + in: query + description: '操作人用户名' + required: false + schema: + type: string requestBody: content: application/json: @@ -998,10 +1061,6 @@ paths: responses: '200': description: '配置项更新成功(编码key)' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: 请求参数错误 content: @@ -1068,76 +1127,11 @@ paths: responses: '200': description: '' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: - put: - summary: 通过文本批量修改配置项 (new added) - operationId: batchUpdateItemsByText - deprecated: false - description: >- - PUT - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: - tags: - - Item Management - parameters: - - name: appId - in: path - description: '' - required: true - schema: - type: string - - name: env - in: path - description: '' - required: true - schema: - type: string - - name: clusterName - in: path - description: '' - required: true - schema: - type: string - - name: namespaceName - in: path - description: '' - required: true - schema: - type: string - - name: operator - in: query - description: '操作人用户名' - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - '200': - description: '批量更新配置项成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - '403': - description: '权限不足' - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: summary: 获取分支下的配置项 (new added) - operationId: getBranchItems + operationId: findBranchItems deprecated: false description: >- GET @@ -1208,14 +1202,14 @@ paths: application/json: schema: $ref: '#/components/schemas/ExceptionResponse' - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff: post: summary: 对比命名空间配置差异 (new added) operationId: compareItems deprecated: false description: >- POST - /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff tags: - Item Management parameters: @@ -1247,7 +1241,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceSyncModel' + $ref: '#/components/schemas/OpenNamespaceSyncDTO' required: true responses: '200': @@ -1257,7 +1251,7 @@ paths: schema: type: array items: - $ref: '#/components/schemas/OpenItemDiffs' + $ref: '#/components/schemas/OpenItemDiffDTO' example: - namespace: appId: '' @@ -1315,14 +1309,14 @@ paths: lineNum: 0 extInfo: '' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: post: summary: 同步配置项到多个命名空间 (new added) operationId: syncItems deprecated: false description: >- POST - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: tags: - Item Management parameters: @@ -1353,22 +1347,18 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string requestBody: content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceSyncModel' + $ref: '#/components/schemas/OpenNamespaceSyncDTO' required: true responses: '200': description: '配置项同步成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: @@ -1382,14 +1372,14 @@ paths: schema: $ref: '#/components/schemas/ExceptionResponse' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation: post: summary: 验证配置文本语法 (new added) - operationId: validateItems + operationId: syntaxCheck deprecated: false description: >- POST - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation tags: - Item Management parameters: @@ -1426,10 +1416,6 @@ paths: responses: '200': description: '配置文本语法验证通过' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '配置文本语法错误' content: @@ -1437,14 +1423,14 @@ paths: schema: $ref: '#/components/schemas/ExceptionResponse' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation: post: summary: 撤销配置项更改 (new added) operationId: revertItems deprecated: false description: >- POST - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation tags: - Item Management parameters: @@ -1475,16 +1461,12 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: '200': description: '配置项更改撤销成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: @@ -1801,7 +1783,7 @@ paths: deprecated: false description: '合并灰度分支并可选择删除分支' tags: - - Release Management + - Namespace Branch Management parameters: - name: appId in: path @@ -2039,7 +2021,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: @@ -2514,14 +2496,71 @@ paths: dataChangeLastModifiedTime: '' dataChangeCreatedTime: '' headers: {} + /openapi/v1/namespaces: + post: + summary: 创建Namespace (new added) + operationId: createNamespaces + deprecated: false + description: POST /openapi/v1/apps/{appId}/namespaces + tags: + - Namespace Management + parameters: + - name: operator + in: query + description: '操作人用户名' + required: false + schema: + type: string + requestBody: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenCreateNamespaceDTO' + required: true + responses: + '200': + description: 'Namespace创建成功' + /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage: + get: + summary: 查询appnamespace使用情况(new added) + operationId: findAppNamespaceUsage + deprecated: false + description: GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + tags: + - AppNamespace Management + parameters: + - name: appId + in: path + description: '应用ID' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '命名空间名称' + required: true + schema: + type: string + responses: + '200': + description: 'AppNamespaceUsage查询成功' + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/OpenNamespaceUsageDTO' + headers: {} /openapi/v1/apps/{appId}/appnamespaces: post: summary: 创建AppNamespace (original openapi) - operationId: createNamespace + operationId: createAppNamespace deprecated: false description: POST /openapi/v1/apps/{appId}/appnamespaces tags: - - Namespace Management + - AppNamespace Management parameters: - name: appId in: path @@ -2529,6 +2568,12 @@ paths: required: true schema: type: string + - name: operator + in: query + description: '操作人用户名' + required: false + schema: + type: string requestBody: content: application/json: @@ -2568,11 +2613,11 @@ paths: $ref: '#/components/schemas/ExceptionResponse' get: summary: 获取指定应用的AppNamespace (new added) - operationId: getAppNamespacesByApp + operationId: getAppNamespacesByAppId deprecated: false description: GET /openapi/v1/apps/{appId}/appnamespaces tags: - - Namespace Management + - AppNamespace Management parameters: - name: appId in: path @@ -2636,6 +2681,13 @@ paths: schema: type: boolean default: true + - name: extendInfo + in: query + description: '' + required: false + schema: + type: boolean + default: false responses: '200': description: '' @@ -2669,7 +2721,7 @@ paths: /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}: get: summary: 获取指定的Namespace (original openapi) - operationId: loadNamespace + operationId: findNamespace deprecated: false description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} tags: @@ -2707,6 +2759,13 @@ paths: schema: type: boolean default: true + - name: extendInfo + in: query + description: '' + required: false + schema: + type: boolean + default: false responses: '200': description: '' @@ -2735,6 +2794,75 @@ paths: value: '' comment: '' headers: {} + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: + get: + summary: 查询关联Namespace对应的公共Namespace详情 (new added) + operationId: findPublicNamespaceForAssociatedNamespace + deprecated: false + description: >- + GET + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace + tags: + - Namespace Management + parameters: + - name: env + in: path + description: '环境标识' + required: true + schema: + type: string + - name: appId + in: path + description: '应用ID' + required: true + schema: + type: string + - name: clusterName + in: path + description: '集群名称' + required: true + schema: + type: string + - name: namespaceName + in: path + description: '关联Namespace名称' + required: true + schema: + type: string + - name: extendInfo + in: query + description: '' + required: false + schema: + type: boolean + default: false + responses: + '200': + description: '成功获取关联的公共Namespace详情' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + example: + dataChangeCreatedBy: 'apollo' + dataChangeLastModifiedBy: 'apollo' + dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' + dataChangeLastModifiedTime: '2024-01-20T11:00:00.000Z' + appId: 'public-owner-app' + clusterName: 'default' + namespaceName: 'public.namespace' + comment: '公共 namespace 示例' + format: 'properties' + isPublic: true + parentAppId: 'public-owner-app' + isConfigHidden: false + itemModifiedCnt: 0 + items: + - key: 'k1' + value: 'v1' + - key: 'k2' + value: 'v2' + headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: get: summary: 获取Namespace的锁状态 (original openapi) @@ -2742,7 +2870,7 @@ paths: deprecated: false description: GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock tags: - - Namespace Management + - Namespace Lock Management parameters: - name: appId in: path @@ -2785,17 +2913,9 @@ paths: summary: 获取所有公共AppNamespace (new added) operationId: getAppNamespaces deprecated: false - description: GET /openapi/v1/appnamespaces?public=true + description: GET /openapi/v1/appnamespaces/public tags: - - Namespace Management - parameters: - - name: publicOnly - in: query - description: '' - required: true - example: 'false' - schema: - type: boolean + - AppNamespace Management responses: '200': description: '' @@ -2820,11 +2940,11 @@ paths: /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: get: summary: 获取指定的AppNamespace (new added) - operationId: getAppNamespace + operationId: findAppNamespace deprecated: false description: GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} tags: - - Namespace Management + - AppNamespace Management parameters: - name: appId in: path @@ -2838,6 +2958,13 @@ paths: required: true schema: type: string + - name: extendInfo + in: query + description: '' + required: false + schema: + type: boolean + default: false responses: '200': description: '成功获取AppNamespace' @@ -2863,7 +2990,7 @@ paths: deprecated: false description: DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} tags: - - Namespace Management + - AppNamespace Management parameters: - name: appId in: path @@ -2880,16 +3007,12 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: '200': description: 'AppNamespace删除成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/apps/{appId}/namespaces/releases/status: get: @@ -2921,7 +3044,7 @@ paths: deprecated: false description: GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances tags: - - Namespace Management + - AppNamespace Management parameters: - name: env in: path @@ -2979,14 +3102,14 @@ paths: value: '' comment: '' headers: {} - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage: get: - summary: 获取关联的公共Namespace (new added) - operationId: getPublicNamespaceAssociation + summary: 查询namespace使用情况(new added) + operationId: findNamespaceUsage deprecated: false description: >- GET - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage tags: - Namespace Management parameters: @@ -3016,40 +3139,22 @@ paths: type: string responses: '200': - description: '成功获取关联的公共Namespace' + description: 'NamespaceUsage查询成功' content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - example: - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - appId: '' - clusterName: '' - namespaceName: '' - comment: '' - format: '' - isPublic: false + type: array items: - - dataChangeCreatedBy: '' - dataChangeLastModifiedBy: '' - dataChangeCreatedTime: '' - dataChangeLastModifiedTime: '' - key: '' - type: 0 - value: '' - comment: '' + $ref: '#/components/schemas/OpenNamespaceUsageDTO' headers: {} - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: get: - summary: 检查缺失的Namespace (new added) - operationId: checkNamespaceIntegrity + summary: 查找缺失的Namespace (new added) + operationId: findMissingNamespaces deprecated: false description: >- GET - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces tags: - Namespace Management parameters: @@ -3083,14 +3188,56 @@ paths: example: - '' headers: {} - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: + post: + summary: 创建缺失的Namespace (new added) + operationId: createMissingNamespaces + deprecated: false + description: >- + POST + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces + tags: + - Namespace Management + parameters: + - name: appId + in: path + description: '应用ID' + required: true + schema: + type: string + - name: env + in: path + description: '环境标识' + required: true + schema: + type: string + - name: clusterName + in: path + description: '集群名称' + required: true + schema: + type: string + - name: operator + in: query + description: '操作人用户名' + required: false + schema: + type: string + responses: + '200': + description: '缺失的命名空间创建成功' + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessEmptyResponse' + headers: {} + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: delete: - summary: 删除关联的Namespace (new added) - operationId: deleteNamespaceLinks + summary: 删除指定的Namespace (new added) + operationId: deleteNamespace deprecated: false description: >- DELETE - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} tags: - Namespace Management parameters: @@ -3121,17 +3268,12 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: '200': description: '解除关联成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - headers: {} /openapi/v1/organizations: get: summary: 获取所有组织信息 (original openapi) @@ -3197,6 +3339,13 @@ paths: required: true schema: type: string + - name: extendInfo + in: query + description: '' + required: false + schema: + type: boolean + default: false responses: '200': description: '成功获取分支信息' @@ -3274,7 +3423,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: @@ -3353,21 +3502,12 @@ paths: responses: '200': description: '分支删除成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - headers: {} - patch: + post: summary: 合并分支到主分支 (new added) operationId: mergeBranch deprecated: false description: >- - PATCH - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - - 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") + POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} tags: - Namespace Branch Management parameters: @@ -3411,7 +3551,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string requestBody: @@ -3556,11 +3696,6 @@ paths: responses: '200': description: '灰度规则更新成功' - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - headers: {} /openapi/v1/envs: get: summary: 获取所有环境 @@ -3660,7 +3795,22 @@ components: description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 OpenItemDTO: type: object + description: Apollo配置项核心数据对象,仅包含键值及基础审计信息 properties: + key: + type: string + description: 配置项的键名,在同一命名空间内唯一标识一个配置项 + value: + type: string + description: 配置项的值,可以是字符串、数字、JSON等格式 + type: + type: integer + description: 配置项类型 + comment: + type: string + description: 配置项的注释说明,用于描述配置项的用途和含义 + extendInfo: + $ref: '#/components/schemas/OpenItemExtendDTO' dataChangeCreatedBy: type: string description: 配置项创建者用户名,记录是谁创建了这个配置项 @@ -3675,6 +3825,32 @@ components: type: string description: 配置项最后修改时间,ISO 8601格式的时间戳 example: "2025-09-29T12:34:56Z" + OpenItemExtendDTO: + type: object + description: Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + properties: + namespaceId: + type: integer + format: int64 + description: 所属命名空间的ID + isModified: + type: boolean + description: 是否有未发布的修改 + isDeleted: + type: boolean + description: 是否被标记为删除(未发布) + isNewlyAdded: + type: boolean + description: 是否为新添加的配置项(未发布) + newValue: + type: string + description: 新的值 + oldValue: + type: string + description: 上一次发布的值,用于对比变更 + OpenCreateItemDTO: + type: object + properties: key: type: string description: 配置项的键名,在同一命名空间内唯一标识一个配置项 @@ -3687,7 +3863,6 @@ components: comment: type: string description: 配置项的注释说明,用于描述配置项的用途和含义 - description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 OpenItemPageDTO: type: object properties: @@ -3859,6 +4034,31 @@ components: type: string description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 + OpenNamespaceUsageDTO: + type: object + properties: + namespaceName: + type: string + description: 命名空间名称 + appId: + type: string + description: 所属应用的唯一标识符 + clusterName: + type: string + description: 所属集群名称 + envName: + type: string + description: 环境名称 + instanceCount: + type: integer + description: 该命名空间关联的实例数量 + branchInstanceCount: + type: integer + description: 分支命名空间关联的实例数量 + linkedNamespaceCount: + type: integer + description: 关联到该公共命名空间的命名空间数量 + description: 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 OpenGrayReleaseRuleItemDTO: type: object properties: @@ -3867,11 +4067,13 @@ components: description: 客户端应用ID,指定哪个应用可以获取灰度配置 clientIpList: type: array + uniqueItems: true items: type: string description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 clientLabelList: type: array + uniqueItems: true items: type: string description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 @@ -3907,10 +4109,27 @@ components: description: 灰度分支名称,标识灰度发布的分支 ruleItems: type: array + uniqueItems: true items: $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' description: 灰度发布规则项列表,包含具体的灰度规则条件 description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 + OpenCreateNamespaceDTO: + type: object + properties: + appId: + type: string + description: 所属应用的唯一标识符 + env: + type: string + description: 所在那个环境创建 + clusterName: + type: string + description: 所属集群的名称 + appNamespaceName: + type: string + description: 根据已创建的appnamespace来实例化namespace + description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 OpenNamespaceDTO: type: object properties: @@ -3951,7 +4170,21 @@ components: items: $ref: '#/components/schemas/OpenItemDTO' description: 命名空间包含的配置项列表 + extendInfo: + $ref: '#/components/schemas/OpenNamespaceExtendDTO' description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + OpenNamespaceExtendDTO: + type: object + properties: + isConfigHidden: + type: boolean + description: '当当前用户无权限查看配置时置为 true' + parentAppId: + type: string + description: 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + itemModifiedCnt: + type: integer + description: 未发布变更数 OpenNamespaceLockDTO: type: object properties: @@ -3964,6 +4197,9 @@ components: lockedBy: type: string description: 锁定者用户名 + isEmergencyPublishAllowed: + type: boolean + description: 是否允许紧急发布 description: Apollo命名空间锁状态数据传输对象 OpenInstancePageDTO: type: object @@ -4104,17 +4340,30 @@ components: $ref: '#/components/schemas/OpenItemDTO' description: '待删除的配置项列表' default: [] - OpenItemDiffs: + OpenItemDiffDTO: type: object properties: + code: + type: integer + description: '查找结果' + message: + type: string + description: '查找结果信息' namespace: $ref: '#/components/schemas/OpenNamespaceIdentifier' - diffs: - $ref: '#/components/schemas/OpenItemChangeSets' - extInfo: - type: string - description: '扩展信息' - OpenNamespaceSyncModel: + createItems: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + deleteItems: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + updateItems: + type: array + items: + $ref: '#/components/schemas/OpenItemDTO' + OpenNamespaceSyncDTO: type: object properties: syncToNamespaces: @@ -4126,7 +4375,10 @@ components: type: array items: $ref: '#/components/schemas/OpenItemDTO' - description: 需要同步的配置项列表 + description: 需要修改的配置项列表 + # operation: + # type: string + # enum: [update, delete, create] KVEntity: type: object properties: @@ -4232,40 +4484,4 @@ components: projectB: darkMode: true - MultiResponseEntity: - type: object - description: A response container holding multiple RichResponseEntity objects - properties: - code: - type: integer - description: Overall HTTP status code - example: 200 - entities: - type: array - description: List of rich response entities - items: - $ref: '#/components/schemas/RichResponseEntity' - required: - - code - - entities - - RichResponseEntity: - type: object - description: A wrapper for a single response entity with code, message, and body - properties: - code: - type: integer - description: HTTP status code - example: 200 - message: - type: object - description: Response message (can be string or object) - example: "OK" - body: - type: object - description: Response payload (generic type T) - required: - - code - - message - servers: [] diff --git a/java-client/.openapi-generator/FILES b/java-client/.openapi-generator/FILES index 7579cbe..71607d2 100644 --- a/java-client/.openapi-generator/FILES +++ b/java-client/.openapi-generator/FILES @@ -7,21 +7,24 @@ api/openapi.yaml build.gradle build.sbt docs/AppManagementApi.md +docs/AppNamespaceManagementApi.md docs/ClusterManagementApi.md docs/EnvironmentManagementApi.md docs/ExceptionResponse.md docs/InstanceManagementApi.md docs/ItemManagementApi.md docs/KVEntity.md -docs/MultiResponseEntity.md docs/NamespaceBranchManagementApi.md docs/NamespaceGrayDelReleaseDTO.md +docs/NamespaceLockManagementApi.md docs/NamespaceManagementApi.md docs/NamespaceReleaseDTO.md docs/OpenAppDTO.md docs/OpenAppNamespaceDTO.md docs/OpenClusterDTO.md docs/OpenCreateAppDTO.md +docs/OpenCreateItemDTO.md +docs/OpenCreateNamespaceDTO.md docs/OpenEnvClusterDTO.md docs/OpenEnvClusterInfo.md docs/OpenGrayReleaseRuleDTO.md @@ -31,20 +34,22 @@ docs/OpenInstanceDTO.md docs/OpenInstancePageDTO.md docs/OpenItemChangeSets.md docs/OpenItemDTO.md -docs/OpenItemDiffs.md +docs/OpenItemDiffDTO.md +docs/OpenItemExtendDTO.md docs/OpenItemPageDTO.md docs/OpenMissEnvDTO.md docs/OpenNamespaceDTO.md +docs/OpenNamespaceExtendDTO.md docs/OpenNamespaceIdentifier.md docs/OpenNamespaceLockDTO.md -docs/OpenNamespaceSyncModel.md +docs/OpenNamespaceSyncDTO.md docs/OpenNamespaceTextModel.md +docs/OpenNamespaceUsageDTO.md docs/OpenOrganizationDto.md docs/OpenReleaseBO.md docs/OpenReleaseDTO.md docs/OrganizationManagementApi.md docs/ReleaseManagementApi.md -docs/RichResponseEntity.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -68,11 +73,13 @@ 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/AppNamespaceManagementApi.java src/main/java/org/openapitools/client/api/ClusterManagementApi.java src/main/java/org/openapitools/client/api/EnvironmentManagementApi.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/NamespaceLockManagementApi.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 @@ -83,13 +90,14 @@ 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/ExceptionResponse.java src/main/java/org/openapitools/client/model/KVEntity.java -src/main/java/org/openapitools/client/model/MultiResponseEntity.java src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.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/OpenCreateItemDTO.java +src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java @@ -99,36 +107,41 @@ src/main/java/org/openapitools/client/model/OpenInstanceDTO.java src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java src/main/java/org/openapitools/client/model/OpenItemChangeSets.java src/main/java/org/openapitools/client/model/OpenItemDTO.java -src/main/java/org/openapitools/client/model/OpenItemDiffs.java +src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java +src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java src/main/java/org/openapitools/client/model/OpenItemPageDTO.java src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java +src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java +src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java +src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java src/main/java/org/openapitools/client/model/OpenOrganizationDto.java src/main/java/org/openapitools/client/model/OpenReleaseBO.java src/main/java/org/openapitools/client/model/OpenReleaseDTO.java -src/main/java/org/openapitools/client/model/RichResponseEntity.java src/test/java/org/openapitools/client/api/AppManagementApiTest.java +src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.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/NamespaceLockManagementApiTest.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/ExceptionResponseTest.java src/test/java/org/openapitools/client/model/KVEntityTest.java -src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.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/OpenCreateItemDTOTest.java +src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java @@ -138,15 +151,17 @@ src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java src/test/java/org/openapitools/client/model/OpenItemChangeSetsTest.java src/test/java/org/openapitools/client/model/OpenItemDTOTest.java -src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java +src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java +src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java +src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java +src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java +src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java src/test/java/org/openapitools/client/model/OpenReleaseBOTest.java src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java -src/test/java/org/openapitools/client/model/RichResponseEntityTest.java diff --git a/java-client/README.md b/java-client/README.md index d9e5490..9074026 100644 --- a/java-client/README.md +++ b/java-client/README.md @@ -146,6 +146,13 @@ Class | Method | HTTP request | Description *AppManagementApi* | [**getEnvClusterInfo**](docs/AppManagementApi.md#getEnvClusterInfo) | **GET** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) *AppManagementApi* | [**getEnvClusters**](docs/AppManagementApi.md#getEnvClusters) | **GET** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) *AppManagementApi* | [**updateApp**](docs/AppManagementApi.md#updateApp) | **PUT** /openapi/v1/apps/{appId} | 更新应用(new added) +*AppNamespaceManagementApi* | [**createAppNamespace**](docs/AppNamespaceManagementApi.md#createAppNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) +*AppNamespaceManagementApi* | [**deleteAppNamespace**](docs/AppNamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) +*AppNamespaceManagementApi* | [**findAppNamespace**](docs/AppNamespaceManagementApi.md#findAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) +*AppNamespaceManagementApi* | [**findAppNamespaceUsage**](docs/AppNamespaceManagementApi.md#findAppNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) +*AppNamespaceManagementApi* | [**getAppNamespaces**](docs/AppNamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) +*AppNamespaceManagementApi* | [**getAppNamespacesByAppId**](docs/AppNamespaceManagementApi.md#getAppNamespacesByAppId) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) +*AppNamespaceManagementApi* | [**getPublicAppNamespaceInstances**](docs/AppNamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) *ClusterManagementApi* | [**createCluster**](docs/ClusterManagementApi.md#createCluster) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) *ClusterManagementApi* | [**deleteCluster**](docs/ClusterManagementApi.md#deleteCluster) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) *ClusterManagementApi* | [**getCluster**](docs/ClusterManagementApi.md#getCluster) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) @@ -154,39 +161,37 @@ Class | Method | HTTP request | Description *InstanceManagementApi* | [**getByRelease**](docs/InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) *InstanceManagementApi* | [**getByReleasesAndNamespaceNotIn**](docs/InstanceManagementApi.md#getByReleasesAndNamespaceNotIn) | **GET** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) *InstanceManagementApi* | [**getInstanceCountByNamespace**](docs/InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -*ItemManagementApi* | [**batchUpdateItemsByText**](docs/ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) -*ItemManagementApi* | [**compareItems**](docs/ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) +*ItemManagementApi* | [**batchUpdateItemsByText**](docs/ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) +*ItemManagementApi* | [**compareItems**](docs/ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) *ItemManagementApi* | [**createItem**](docs/ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) *ItemManagementApi* | [**deleteItem**](docs/ItemManagementApi.md#deleteItem) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) *ItemManagementApi* | [**deleteItemByEncodedKey**](docs/ItemManagementApi.md#deleteItemByEncodedKey) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) +*ItemManagementApi* | [**findBranchItems**](docs/ItemManagementApi.md#findBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) *ItemManagementApi* | [**findItemsByNamespace**](docs/ItemManagementApi.md#findItemsByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) -*ItemManagementApi* | [**getBranchItems**](docs/ItemManagementApi.md#getBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) *ItemManagementApi* | [**getItem**](docs/ItemManagementApi.md#getItem) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) *ItemManagementApi* | [**getItemByEncodedKey**](docs/ItemManagementApi.md#getItemByEncodedKey) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) -*ItemManagementApi* | [**revertItems**](docs/ItemManagementApi.md#revertItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) -*ItemManagementApi* | [**syncItems**](docs/ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) +*ItemManagementApi* | [**revertItems**](docs/ItemManagementApi.md#revertItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation | 撤销配置项更改 (new added) +*ItemManagementApi* | [**syncItems**](docs/ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) +*ItemManagementApi* | [**syntaxCheck**](docs/ItemManagementApi.md#syntaxCheck) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) *ItemManagementApi* | [**updateItem**](docs/ItemManagementApi.md#updateItem) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) *ItemManagementApi* | [**updateItemByEncodedKey**](docs/ItemManagementApi.md#updateItemByEncodedKey) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) -*ItemManagementApi* | [**validateItems**](docs/ItemManagementApi.md#validateItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) *NamespaceBranchManagementApi* | [**createBranch**](docs/NamespaceBranchManagementApi.md#createBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 创建命名空间分支 (original openapi) *NamespaceBranchManagementApi* | [**deleteBranch**](docs/NamespaceBranchManagementApi.md#deleteBranch) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) *NamespaceBranchManagementApi* | [**findBranch**](docs/NamespaceBranchManagementApi.md#findBranch) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) *NamespaceBranchManagementApi* | [**getBranchGrayRules**](docs/NamespaceBranchManagementApi.md#getBranchGrayRules) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) -*NamespaceBranchManagementApi* | [**mergeBranch**](docs/NamespaceBranchManagementApi.md#mergeBranch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) +*NamespaceBranchManagementApi* | [**merge**](docs/NamespaceBranchManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) +*NamespaceBranchManagementApi* | [**mergeBranch**](docs/NamespaceBranchManagementApi.md#mergeBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) *NamespaceBranchManagementApi* | [**updateBranchRules**](docs/NamespaceBranchManagementApi.md#updateBranchRules) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) -*NamespaceManagementApi* | [**checkNamespaceIntegrity**](docs/NamespaceManagementApi.md#checkNamespaceIntegrity) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) -*NamespaceManagementApi* | [**createNamespace**](docs/NamespaceManagementApi.md#createNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) -*NamespaceManagementApi* | [**deleteAppNamespace**](docs/NamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) -*NamespaceManagementApi* | [**deleteNamespaceLinks**](docs/NamespaceManagementApi.md#deleteNamespaceLinks) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) +*NamespaceLockManagementApi* | [**getNamespaceLock**](docs/NamespaceLockManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +*NamespaceManagementApi* | [**createMissingNamespaces**](docs/NamespaceManagementApi.md#createMissingNamespaces) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) +*NamespaceManagementApi* | [**createNamespaces**](docs/NamespaceManagementApi.md#createNamespaces) | **POST** /openapi/v1/namespaces | 创建Namespace (new added) +*NamespaceManagementApi* | [**deleteNamespace**](docs/NamespaceManagementApi.md#deleteNamespace) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) +*NamespaceManagementApi* | [**findMissingNamespaces**](docs/NamespaceManagementApi.md#findMissingNamespaces) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) +*NamespaceManagementApi* | [**findNamespace**](docs/NamespaceManagementApi.md#findNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) +*NamespaceManagementApi* | [**findNamespaceUsage**](docs/NamespaceManagementApi.md#findNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) *NamespaceManagementApi* | [**findNamespaces**](docs/NamespaceManagementApi.md#findNamespaces) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) -*NamespaceManagementApi* | [**getAppNamespace**](docs/NamespaceManagementApi.md#getAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) -*NamespaceManagementApi* | [**getAppNamespaces**](docs/NamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) -*NamespaceManagementApi* | [**getAppNamespacesByApp**](docs/NamespaceManagementApi.md#getAppNamespacesByApp) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) -*NamespaceManagementApi* | [**getNamespaceLock**](docs/NamespaceManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +*NamespaceManagementApi* | [**findPublicNamespaceForAssociatedNamespace**](docs/NamespaceManagementApi.md#findPublicNamespaceForAssociatedNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) *NamespaceManagementApi* | [**getNamespacesReleaseStatus**](docs/NamespaceManagementApi.md#getNamespacesReleaseStatus) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) -*NamespaceManagementApi* | [**getPublicAppNamespaceInstances**](docs/NamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) -*NamespaceManagementApi* | [**getPublicNamespaceAssociation**](docs/NamespaceManagementApi.md#getPublicNamespaceAssociation) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) -*NamespaceManagementApi* | [**loadNamespace**](docs/NamespaceManagementApi.md#loadNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) *OrganizationManagementApi* | [**getOrganization**](docs/OrganizationManagementApi.md#getOrganization) | **GET** /openapi/v1/organizations | 获取所有组织信息 (original openapi) *ReleaseManagementApi* | [**createGrayDelRelease**](docs/ReleaseManagementApi.md#createGrayDelRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 (original openapi) *ReleaseManagementApi* | [**createGrayRelease**](docs/ReleaseManagementApi.md#createGrayRelease) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 (original openapi) @@ -195,7 +200,6 @@ Class | Method | HTTP request | Description *ReleaseManagementApi* | [**findAllReleases**](docs/ReleaseManagementApi.md#findAllReleases) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) *ReleaseManagementApi* | [**getReleaseById**](docs/ReleaseManagementApi.md#getReleaseById) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) *ReleaseManagementApi* | [**loadLatestActiveRelease**](docs/ReleaseManagementApi.md#loadLatestActiveRelease) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) -*ReleaseManagementApi* | [**merge**](docs/ReleaseManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) *ReleaseManagementApi* | [**rollback**](docs/ReleaseManagementApi.md#rollback) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) @@ -203,13 +207,14 @@ Class | Method | HTTP request | Description - [ExceptionResponse](docs/ExceptionResponse.md) - [KVEntity](docs/KVEntity.md) - - [MultiResponseEntity](docs/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) - [NamespaceReleaseDTO](docs/NamespaceReleaseDTO.md) - [OpenAppDTO](docs/OpenAppDTO.md) - [OpenAppNamespaceDTO](docs/OpenAppNamespaceDTO.md) - [OpenClusterDTO](docs/OpenClusterDTO.md) - [OpenCreateAppDTO](docs/OpenCreateAppDTO.md) + - [OpenCreateItemDTO](docs/OpenCreateItemDTO.md) + - [OpenCreateNamespaceDTO](docs/OpenCreateNamespaceDTO.md) - [OpenEnvClusterDTO](docs/OpenEnvClusterDTO.md) - [OpenEnvClusterInfo](docs/OpenEnvClusterInfo.md) - [OpenGrayReleaseRuleDTO](docs/OpenGrayReleaseRuleDTO.md) @@ -219,18 +224,20 @@ Class | Method | HTTP request | Description - [OpenInstancePageDTO](docs/OpenInstancePageDTO.md) - [OpenItemChangeSets](docs/OpenItemChangeSets.md) - [OpenItemDTO](docs/OpenItemDTO.md) - - [OpenItemDiffs](docs/OpenItemDiffs.md) + - [OpenItemDiffDTO](docs/OpenItemDiffDTO.md) + - [OpenItemExtendDTO](docs/OpenItemExtendDTO.md) - [OpenItemPageDTO](docs/OpenItemPageDTO.md) - [OpenMissEnvDTO](docs/OpenMissEnvDTO.md) - [OpenNamespaceDTO](docs/OpenNamespaceDTO.md) + - [OpenNamespaceExtendDTO](docs/OpenNamespaceExtendDTO.md) - [OpenNamespaceIdentifier](docs/OpenNamespaceIdentifier.md) - [OpenNamespaceLockDTO](docs/OpenNamespaceLockDTO.md) - - [OpenNamespaceSyncModel](docs/OpenNamespaceSyncModel.md) + - [OpenNamespaceSyncDTO](docs/OpenNamespaceSyncDTO.md) - [OpenNamespaceTextModel](docs/OpenNamespaceTextModel.md) + - [OpenNamespaceUsageDTO](docs/OpenNamespaceUsageDTO.md) - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - [OpenReleaseBO](docs/OpenReleaseBO.md) - [OpenReleaseDTO](docs/OpenReleaseDTO.md) - - [RichResponseEntity](docs/RichResponseEntity.md) diff --git a/java-client/api/openapi.yaml b/java-client/api/openapi.yaml index ed0706c..adb0a38 100644 --- a/java-client/api/openapi.yaml +++ b/java-client/api/openapi.yaml @@ -33,8 +33,12 @@ tags: name: Cluster Management - description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 name: Namespace Management +- description: AppNamespace管理相关接口,包括创建、查询、删除等操作 + name: AppNamespace Management +- description: 命名空间锁管理相关接口 + name: Namespace Lock Management - description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 - name: Namespace Namespace Branch Management + name: Namespace Branch Management - description: 实例管理相关接口,包括实例查询、配置生效状态等功能 name: Instance Management - description: 组织管理相关接口,包括组织信息查询等功能 @@ -179,7 +183,7 @@ paths: /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envClusters" + description: "GET /openapi/v1/apps/{appId}/envclusters" operationId: getEnvClusters parameters: - description: 应用ID @@ -606,16 +610,12 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项删除成功 summary: 删除配置项 (original openapi) tags: @@ -747,6 +747,14 @@ paths: default: false type: boolean style: form + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -755,10 +763,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功 "400": content: @@ -928,7 +932,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -971,6 +975,71 @@ paths: - Item Management x-content-type: application/json x-accepts: application/json + put: + deprecated: false + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:" + operationId: batchUpdateItemsByText + 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: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceTextModel' + required: true + responses: + "200": + description: 批量更新配置项成功 + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ExceptionResponse' + description: 权限不足 + summary: 通过文本批量修改配置项 (new added) + 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 @@ -1027,10 +1096,6 @@ paths: style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: "" summary: 通过编码的key删除配置项 (original openapi) tags: @@ -1162,6 +1227,14 @@ paths: default: false type: boolean style: form + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -1170,10 +1243,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功(编码key) "400": content: @@ -1198,81 +1267,11 @@ paths: - 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 /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:" - operationId: batchUpdateItemsByText - 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 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - description: 批量更新配置项成功 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 通过文本批量修改配置项 (new added) - 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 /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:" - operationId: getBranchItems + operationId: findBranchItems parameters: - description: 应用ID explode: false @@ -1350,10 +1349,10 @@ paths: tags: - Item Management x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" + description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" operationId: compareItems parameters: - description: 应用ID @@ -1392,7 +1391,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceSyncModel' + $ref: '#/components/schemas/OpenNamespaceSyncDTO' required: true responses: "200": @@ -1456,7 +1455,7 @@ paths: extInfo: "" schema: items: - $ref: '#/components/schemas/OpenItemDiffs' + $ref: '#/components/schemas/OpenItemDiffDTO' type: array description: 成功对比命名空间配置差异 summary: 对比命名空间配置差异 (new added) @@ -1464,10 +1463,10 @@ paths: - Item Management x-content-type: application/json x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:" operationId: syncItems parameters: - description: 应用ID @@ -1506,7 +1505,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -1514,14 +1513,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceSyncModel' + $ref: '#/components/schemas/OpenNamespaceSyncDTO' required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项同步成功 "400": content: @@ -1540,11 +1535,11 @@ paths: - Item Management x-content-type: application/json x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" - operationId: validateItems + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" + operationId: syntaxCheck parameters: - description: "" explode: false @@ -1586,10 +1581,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置文本语法验证通过 "400": content: @@ -1602,10 +1593,10 @@ paths: - Item Management x-content-type: application/json x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" operationId: revertItems parameters: - description: "" @@ -1644,16 +1635,12 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更改撤销成功 "400": content: @@ -2101,7 +2088,7 @@ paths: description: 权限不足 summary: 合并分支 (original openapi) tags: - - Release Management + - 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: @@ -2287,7 +2274,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -2835,11 +2822,76 @@ paths: tags: - Instance Management x-accepts: application/json + /openapi/v1/namespaces: + post: + deprecated: false + description: "POST /openapi/v1/apps/{appId}/namespaces" + operationId: createNamespaces + parameters: + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/OpenCreateNamespaceDTO' + type: array + required: true + responses: + "200": + description: Namespace创建成功 + summary: 创建Namespace (new added) + tags: + - Namespace Management + x-content-type: application/json + x-accepts: application/json + /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage: + get: + deprecated: false + description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" + operationId: findAppNamespaceUsage + parameters: + - description: 应用ID + 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: + items: + $ref: '#/components/schemas/OpenNamespaceUsageDTO' + type: array + description: AppNamespaceUsage查询成功 + summary: 查询appnamespace使用情况(new added) + tags: + - AppNamespace Management + x-accepts: application/json /openapi/v1/apps/{appId}/appnamespaces: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces" - operationId: getAppNamespacesByApp + operationId: getAppNamespacesByAppId parameters: - description: "" explode: false @@ -2871,12 +2923,12 @@ paths: description: "" summary: 获取指定应用的AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json post: deprecated: false description: "POST /openapi/v1/apps/{appId}/appnamespaces" - operationId: createNamespace + operationId: createAppNamespace parameters: - description: "" explode: false @@ -2886,6 +2938,14 @@ paths: schema: type: string style: simple + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -2924,7 +2984,7 @@ paths: description: 权限不足 summary: 创建AppNamespace (original openapi) tags: - - Namespace Management + - AppNamespace Management x-content-type: application/json x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: @@ -2967,6 +3027,15 @@ paths: default: true type: boolean style: form + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3004,7 +3073,7 @@ paths: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - operationId: loadNamespace + operationId: findNamespace parameters: - description: "" explode: false @@ -3048,6 +3117,15 @@ paths: default: true type: boolean style: form + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3079,6 +3157,83 @@ paths: tags: - Namespace Management x-accepts: application/json + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: + get: + deprecated: false + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" + operationId: findPublicNamespaceForAssociatedNamespace + parameters: + - description: 环境标识 + explode: false + in: path + name: env + required: true + schema: + type: string + style: simple + - description: 应用ID + 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: 关联Namespace名称 + explode: false + in: path + name: namespaceName + required: true + schema: + type: string + style: simple + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + example: + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-15T10:30:00.000Z + dataChangeLastModifiedTime: 2024-01-20T11:00:00.000Z + appId: public-owner-app + clusterName: default + namespaceName: public.namespace + comment: 公共 namespace 示例 + format: properties + isPublic: true + parentAppId: public-owner-app + isConfigHidden: false + itemModifiedCnt: 0 + items: + - key: k1 + value: v1 + - key: k2 + value: v2 + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 成功获取关联的公共Namespace详情 + summary: 查询关联Namespace对应的公共Namespace详情 (new added) + tags: + - Namespace Management + x-accepts: application/json /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: get: deprecated: false @@ -3130,23 +3285,13 @@ paths: description: "" summary: 获取Namespace的锁状态 (original openapi) tags: - - Namespace Management + - Namespace Lock Management x-accepts: application/json /openapi/v1/appnamespaces: get: deprecated: false - description: GET /openapi/v1/appnamespaces?public=true + description: GET /openapi/v1/appnamespaces/public operationId: getAppNamespaces - parameters: - - description: "" - example: "false" - explode: true - in: query - name: publicOnly - required: true - schema: - type: boolean - style: form responses: "200": content: @@ -3169,7 +3314,7 @@ paths: description: "" summary: 获取所有公共AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: delete: @@ -3197,25 +3342,21 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: AppNamespace删除成功 summary: 删除AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - operationId: getAppNamespace + operationId: findAppNamespace parameters: - description: 应用ID explode: false @@ -3233,6 +3374,15 @@ paths: schema: type: string style: simple + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3253,7 +3403,7 @@ paths: description: 成功获取AppNamespace summary: 获取指定的AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json /openapi/v1/apps/{appId}/namespaces/releases/status: get: @@ -3351,13 +3501,13 @@ paths: description: 成功获取实例列表 summary: 获取公共AppNamespace的所有实例 (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" - operationId: getPublicNamespaceAssociation + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" + operationId: findNamespaceUsage parameters: - description: 应用ID explode: false @@ -3395,38 +3545,20 @@ paths: "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: 成功获取关联的公共Namespace - summary: 获取关联的公共Namespace (new added) + items: + $ref: '#/components/schemas/OpenNamespaceUsageDTO' + type: array + description: NamespaceUsage查询成功 + summary: 查询namespace使用情况(new added) tags: - Namespace Management x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" - operationId: checkNamespaceIntegrity + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" + operationId: findMissingNamespaces parameters: - description: 应用ID explode: false @@ -3463,15 +3595,63 @@ paths: type: string type: array description: 缺失的命名空间名称列表 - summary: 检查缺失的Namespace (new added) + summary: 查找缺失的Namespace (new added) tags: - Namespace Management x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: + post: + deprecated: false + description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" + operationId: createMissingNamespaces + parameters: + - description: 应用ID + 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: true + in: query + name: operator + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessEmptyResponse' + description: 缺失的命名空间创建成功 + summary: 创建缺失的Namespace (new added) + tags: + - Namespace Management + x-accepts: application/json + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: delete: deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" - operationId: deleteNamespaceLinks + description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" + operationId: deleteNamespace parameters: - description: 应用ID explode: false @@ -3509,18 +3689,14 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 解除关联成功 - summary: 删除关联的Namespace (new added) + summary: 删除指定的Namespace (new added) tags: - Namespace Management x-accepts: application/json @@ -3594,6 +3770,15 @@ paths: schema: type: string style: simple + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3680,7 +3865,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -3771,21 +3956,14 @@ paths: style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 分支删除成功 summary: 删除命名空间分支 (original openapi) tags: - Namespace Branch Management x-accepts: application/json - patch: + post: deprecated: false - description: |- - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" operationId: mergeBranch parameters: - description: 环境标识 @@ -3841,7 +4019,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -4010,10 +4188,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 灰度规则更新成功 summary: 更新分支灰度发布规则 (original openapi) tags: @@ -4128,17 +4302,38 @@ components: $ref: '#/components/schemas/OpenAppDTO' type: object OpenItemDTO: - description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + description: Apollo配置项核心数据对象,仅包含键值及基础审计信息 example: dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: + key: + description: 配置项的键名,在同一命名空间内唯一标识一个配置项 + type: string + value: + description: 配置项的值,可以是字符串、数字、JSON等格式 + type: string + type: + description: 配置项类型 + type: integer + comment: + description: 配置项的注释说明,用于描述配置项的用途和含义 + type: string + extendInfo: + $ref: '#/components/schemas/OpenItemExtendDTO' dataChangeCreatedBy: description: 配置项创建者用户名,记录是谁创建了这个配置项 type: string @@ -4153,6 +4348,39 @@ components: description: 配置项最后修改时间,ISO 8601格式的时间戳 example: 2025-09-29T12:34:56Z type: string + type: object + OpenItemExtendDTO: + description: Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + example: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true + properties: + namespaceId: + description: 所属命名空间的ID + format: int64 + type: integer + isModified: + description: 是否有未发布的修改 + type: boolean + isDeleted: + description: 是否被标记为删除(未发布) + type: boolean + isNewlyAdded: + description: 是否为新添加的配置项(未发布) + type: boolean + newValue: + description: 新的值 + type: string + oldValue: + description: 上一次发布的值,用于对比变更 + type: string + type: object + OpenCreateItemDTO: + properties: key: description: 配置项的键名,在同一命名空间内唯一标识一个配置项 type: string @@ -4178,17 +4406,31 @@ components: dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: page: description: 当前页码,从0开始计数 @@ -4407,6 +4649,39 @@ components: description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 type: string type: object + OpenNamespaceUsageDTO: + description: 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + example: + branchInstanceCount: 6 + envName: envName + instanceCount: 0 + appId: appId + clusterName: clusterName + linkedNamespaceCount: 1 + namespaceName: namespaceName + properties: + namespaceName: + description: 命名空间名称 + type: string + appId: + description: 所属应用的唯一标识符 + type: string + clusterName: + description: 所属集群名称 + type: string + envName: + description: 环境名称 + type: string + instanceCount: + description: 该命名空间关联的实例数量 + type: integer + branchInstanceCount: + description: 分支命名空间关联的实例数量 + type: integer + linkedNamespaceCount: + description: 关联到该公共命名空间的命名空间数量 + type: integer + type: object OpenGrayReleaseRuleItemDTO: description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 example: @@ -4426,11 +4701,13 @@ components: items: type: string type: array + uniqueItems: true clientLabelList: description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 items: type: string type: array + uniqueItems: true type: object OpenGrayReleaseRuleDTO: description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 @@ -4490,6 +4767,28 @@ components: items: $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' type: array + uniqueItems: true + type: object + OpenCreateNamespaceDTO: + description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + example: + appNamespaceName: appNamespaceName + appId: appId + clusterName: clusterName + env: env + properties: + appId: + description: 所属应用的唯一标识符 + type: string + env: + description: 所在那个环境创建 + type: string + clusterName: + description: 所属集群的名称 + type: string + appNamespaceName: + description: 根据已创建的appnamespace来实例化namespace + type: string type: object OpenNamespaceDTO: description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 @@ -4502,23 +4801,41 @@ components: format: format isPublic: true comment: comment + extendInfo: + parentAppId: parentAppId + isConfigHidden: true + itemModifiedCnt: 0 items: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: @@ -4559,6 +4876,24 @@ components: items: $ref: '#/components/schemas/OpenItemDTO' type: array + extendInfo: + $ref: '#/components/schemas/OpenNamespaceExtendDTO' + type: object + OpenNamespaceExtendDTO: + example: + parentAppId: parentAppId + isConfigHidden: true + itemModifiedCnt: 0 + properties: + isConfigHidden: + description: 当当前用户无权限查看配置时置为 true + type: boolean + parentAppId: + description: 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + type: string + itemModifiedCnt: + description: 未发布变更数 + type: integer type: object OpenNamespaceLockDTO: description: Apollo命名空间锁状态数据传输对象 @@ -4566,6 +4901,7 @@ components: lockedBy: lockedBy isLocked: true namespaceName: namespaceName + isEmergencyPublishAllowed: true properties: namespaceName: description: 命名空间名称 @@ -4576,6 +4912,9 @@ components: lockedBy: description: 锁定者用户名 type: string + isEmergencyPublishAllowed: + description: 是否允许紧急发布 + type: boolean type: object OpenInstancePageDTO: description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 @@ -4800,180 +5139,171 @@ components: type: string type: object OpenItemChangeSets: + properties: + dataChangeCreatedBy: + description: 变更集合创建者用户名 + type: string + dataChangeLastModifiedBy: + description: 变更集合最后修改者用户名 + type: string + dataChangeCreatedByDisplayName: + description: 创建者显示名 + type: string + dataChangeLastModifiedByDisplayName: + description: 最后修改者显示名 + type: string + dataChangeCreatedTime: + description: 变更集合创建时间(ISO 8601) + example: 2025-09-29T12:34:56Z + type: string + dataChangeLastModifiedTime: + description: 变更集合最后修改时间(ISO 8601) + example: 2025-09-29T12:34:56Z + type: string + createItems: + default: [] + description: 待创建的配置项列表 + items: + $ref: '#/components/schemas/OpenItemDTO' + type: array + updateItems: + default: [] + description: 待更新的配置项列表 + items: + $ref: '#/components/schemas/OpenItemDTO' + type: array + deleteItems: + default: [] + description: 待删除的配置项列表 + items: + $ref: '#/components/schemas/OpenItemDTO' + type: array + type: object + OpenItemDiffDTO: example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy + code: 0 + namespace: + appId: appId + clusterName: clusterName + env: env + namespaceName: namespaceName deleteItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z createItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + message: message updateItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: - dataChangeCreatedBy: - description: 变更集合创建者用户名 - type: string - dataChangeLastModifiedBy: - description: 变更集合最后修改者用户名 - type: string - dataChangeCreatedByDisplayName: - description: 创建者显示名 - type: string - dataChangeLastModifiedByDisplayName: - description: 最后修改者显示名 - type: string - dataChangeCreatedTime: - description: 变更集合创建时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 变更集合最后修改时间(ISO 8601) - example: 2025-09-29T12:34:56Z + code: + description: 查找结果 + type: integer + message: + description: 查找结果信息 type: string + namespace: + $ref: '#/components/schemas/OpenNamespaceIdentifier' createItems: - default: [] - description: 待创建的配置项列表 items: $ref: '#/components/schemas/OpenItemDTO' type: array - updateItems: - default: [] - description: 待更新的配置项列表 + deleteItems: items: $ref: '#/components/schemas/OpenItemDTO' type: array - deleteItems: - default: [] - description: 待删除的配置项列表 + updateItems: items: $ref: '#/components/schemas/OpenItemDTO' type: array type: object - OpenItemDiffs: - example: - namespace: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - diffs: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - deleteItems: - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - createItems: - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - updateItems: - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - extInfo: extInfo - properties: - namespace: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - diffs: - $ref: '#/components/schemas/OpenItemChangeSets' - extInfo: - description: 扩展信息 - type: string - type: object - OpenNamespaceSyncModel: + OpenNamespaceSyncDTO: example: syncItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z @@ -4981,17 +5311,31 @@ components: dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z syncToNamespaces: - appId: appId clusterName: clusterName @@ -5008,7 +5352,7 @@ components: $ref: '#/components/schemas/OpenNamespaceIdentifier' type: array syncItems: - description: 需要同步的配置项列表 + description: 需要修改的配置项列表 items: $ref: '#/components/schemas/OpenItemDTO' type: array @@ -5196,41 +5540,6 @@ components: projectB: darkMode: true type: object - MultiResponseEntity: - description: A response container holding multiple RichResponseEntity objects - properties: - code: - description: Overall HTTP status code - example: 200 - type: integer - entities: - description: List of rich response entities - items: - $ref: '#/components/schemas/RichResponseEntity' - type: array - required: - - code - - entities - type: object - RichResponseEntity: - description: "A wrapper for a single response entity with code, message, and\ - \ body" - properties: - code: - description: HTTP status code - example: 200 - type: integer - message: - description: Response message (can be string or object) - example: OK - type: object - body: - description: Response payload (generic type T) - type: object - required: - - code - - message - type: object securitySchemes: ApiKeyAuth: description: | diff --git a/java-client/docs/AppManagementApi.md b/java-client/docs/AppManagementApi.md index 4985233..5ec22e3 100644 --- a/java-client/docs/AppManagementApi.md +++ b/java-client/docs/AppManagementApi.md @@ -659,7 +659,7 @@ public class Example { 获取应用的环境集群信息 (original openapi) -GET /openapi/v1/apps/{appId}/envClusters +GET /openapi/v1/apps/{appId}/envclusters ### Example ```java diff --git a/java-client/docs/AppNamespaceManagementApi.md b/java-client/docs/AppNamespaceManagementApi.md new file mode 100644 index 0000000..85f386b --- /dev/null +++ b/java-client/docs/AppNamespaceManagementApi.md @@ -0,0 +1,514 @@ +# AppNamespaceManagementApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**createAppNamespace**](AppNamespaceManagementApi.md#createAppNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) | +| [**deleteAppNamespace**](AppNamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) | +| [**findAppNamespace**](AppNamespaceManagementApi.md#findAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) | +| [**findAppNamespaceUsage**](AppNamespaceManagementApi.md#findAppNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) | +| [**getAppNamespaces**](AppNamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) | +| [**getAppNamespacesByAppId**](AppNamespaceManagementApi.md#getAppNamespacesByAppId) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) | +| [**getPublicAppNamespaceInstances**](AppNamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) | + + + +# **createAppNamespace** +> OpenAppNamespaceDTO createAppNamespace(appId, openAppNamespaceDTO, operator) + +创建AppNamespace (original openapi) + +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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | + OpenAppNamespaceDTO openAppNamespaceDTO = new OpenAppNamespaceDTO(); // OpenAppNamespaceDTO | + String operator = "operator_example"; // String | 操作人用户名 + try { + OpenAppNamespaceDTO result = apiInstance.createAppNamespace(appId, openAppNamespaceDTO, operator); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#createAppNamespace"); + 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)| | | +| **operator** | **String**| 操作人用户名 | [optional] | + +### 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** | 权限不足 | - | + + +# **deleteAppNamespace** +> deleteAppNamespace(appId, namespaceName, operator) + +删除AppNamespace (new added) + +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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String operator = "operator_example"; // String | 操作人用户名 + try { + apiInstance.deleteAppNamespace(appId, namespaceName, operator); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#deleteAppNamespace"); + 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**| 应用ID | | +| **namespaceName** | **String**| 命名空间名称 | | +| **operator** | **String**| 操作人用户名 | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | AppNamespace删除成功 | - | + + +# **findAppNamespace** +> OpenAppNamespaceDTO findAppNamespace(appId, namespaceName, extendInfo) + +获取指定的AppNamespace (new added) + +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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Boolean extendInfo = false; // Boolean | + try { + OpenAppNamespaceDTO result = apiInstance.findAppNamespace(appId, namespaceName, extendInfo); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#findAppNamespace"); + 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**| 应用ID | | +| **namespaceName** | **String**| 命名空间名称 | | +| **extendInfo** | **Boolean**| | [optional] [default to false] | + +### 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** | 成功获取AppNamespace | - | + + +# **findAppNamespaceUsage** +> List<OpenNamespaceUsageDTO> findAppNamespaceUsage(appId, namespaceName) + +查询appnamespace使用情况(new added) + +GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + +### 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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | 应用ID + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + try { + List result = apiInstance.findAppNamespaceUsage(appId, namespaceName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#findAppNamespaceUsage"); + 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**| 应用ID | | +| **namespaceName** | **String**| 命名空间名称 | | + +### Return type + +[**List<OpenNamespaceUsageDTO>**](OpenNamespaceUsageDTO.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** | AppNamespaceUsage查询成功 | - | + + +# **getAppNamespaces** +> List<OpenAppNamespaceDTO> getAppNamespaces() + +获取所有公共AppNamespace (new added) + +GET /openapi/v1/appnamespaces/public + +### 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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + try { + List result = apiInstance.getAppNamespaces(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#getAppNamespaces"); + 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<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** | | - | + + +# **getAppNamespacesByAppId** +> List<OpenAppNamespaceDTO> getAppNamespacesByAppId(appId) + +获取指定应用的AppNamespace (new added) + +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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + String appId = "appId_example"; // String | + try { + List result = apiInstance.getAppNamespacesByAppId(appId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#getAppNamespacesByAppId"); + 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** | | - | + + +# **getPublicAppNamespaceInstances** +> List<OpenNamespaceDTO> getPublicAppNamespaceInstances(env, publicNamespaceName, page, size) + +获取公共AppNamespace的所有实例 (new added) + +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.AppNamespaceManagementApi; + +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"); + + AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); + String env = "env_example"; // String | 环境标识 + String publicNamespaceName = "publicNamespaceName_example"; // String | 公共命名空间名称 + Integer page = 0; // Integer | 页码,从0开始 + Integer size = 10; // Integer | 每页数量 + try { + List result = apiInstance.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AppNamespaceManagementApi#getPublicAppNamespaceInstances"); + 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**| 页码,从0开始 | | +| **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** | 成功获取实例列表 | - | diff --git a/java-client/docs/ItemManagementApi.md b/java-client/docs/ItemManagementApi.md index df5c7fa..00f493b 100644 --- a/java-client/docs/ItemManagementApi.md +++ b/java-client/docs/ItemManagementApi.md @@ -4,29 +4,29 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**batchUpdateItemsByText**](ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) | -| [**compareItems**](ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) | +| [**batchUpdateItemsByText**](ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) | +| [**compareItems**](ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) | | [**createItem**](ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) | | [**deleteItem**](ItemManagementApi.md#deleteItem) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) | | [**deleteItemByEncodedKey**](ItemManagementApi.md#deleteItemByEncodedKey) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) | +| [**findBranchItems**](ItemManagementApi.md#findBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) | | [**findItemsByNamespace**](ItemManagementApi.md#findItemsByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) | -| [**getBranchItems**](ItemManagementApi.md#getBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) | | [**getItem**](ItemManagementApi.md#getItem) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) | | [**getItemByEncodedKey**](ItemManagementApi.md#getItemByEncodedKey) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) | -| [**revertItems**](ItemManagementApi.md#revertItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) | -| [**syncItems**](ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) | +| [**revertItems**](ItemManagementApi.md#revertItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation | 撤销配置项更改 (new added) | +| [**syncItems**](ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) | +| [**syntaxCheck**](ItemManagementApi.md#syntaxCheck) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) | | [**updateItem**](ItemManagementApi.md#updateItem) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) | | [**updateItemByEncodedKey**](ItemManagementApi.md#updateItemByEncodedKey) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) | -| [**validateItems**](ItemManagementApi.md#validateItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) | # **batchUpdateItemsByText** -> Object batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel) +> batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator) 通过文本批量修改配置项 (new added) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: ### Example ```java @@ -54,11 +54,10 @@ public class Example { String env = "env_example"; // String | String clusterName = "clusterName_example"; // String | String namespaceName = "namespaceName_example"; // String | - String operator = "operator_example"; // String | 操作人用户名 OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | + String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); - System.out.println(result); + apiInstance.batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#batchUpdateItemsByText"); System.err.println("Status code: " + e.getCode()); @@ -78,12 +77,12 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **operator** | **String**| 操作人用户名 | | | **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -102,11 +101,11 @@ public class Example { # **compareItems** -> List<OpenItemDiffs> compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel) +> List<OpenItemDiffDTO> compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO) 对比命名空间配置差异 (new added) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare +POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff ### Example ```java @@ -134,9 +133,9 @@ public class Example { String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 - OpenNamespaceSyncModel openNamespaceSyncModel = new OpenNamespaceSyncModel(); // OpenNamespaceSyncModel | + OpenNamespaceSyncDTO openNamespaceSyncDTO = new OpenNamespaceSyncDTO(); // OpenNamespaceSyncDTO | try { - List result = apiInstance.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel); + List result = apiInstance.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#compareItems"); @@ -157,11 +156,11 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **openNamespaceSyncModel** | [**OpenNamespaceSyncModel**](OpenNamespaceSyncModel.md)| | | +| **openNamespaceSyncDTO** | [**OpenNamespaceSyncDTO**](OpenNamespaceSyncDTO.md)| | | ### Return type -[**List<OpenItemDiffs>**](OpenItemDiffs.md) +[**List<OpenItemDiffDTO>**](OpenItemDiffDTO.md) ### Authorization @@ -179,7 +178,7 @@ public class Example { # **createItem** -> OpenItemDTO createItem(appId, env, clusterName, namespaceName, operator, openItemDTO) +> OpenItemDTO createItem(appId, env, clusterName, namespaceName, openItemDTO, operator) 创建新的配置项 (original openapi) @@ -211,10 +210,10 @@ public class Example { String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String operator = "operator_example"; // String | 操作人用户名 OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | + String operator = "operator_example"; // String | 操作人用户名 try { - OpenItemDTO result = apiInstance.createItem(appId, env, clusterName, namespaceName, operator, openItemDTO); + OpenItemDTO result = apiInstance.createItem(appId, env, clusterName, namespaceName, openItemDTO, operator); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#createItem"); @@ -235,8 +234,8 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | | | **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type @@ -260,7 +259,7 @@ public class Example { # **deleteItem** -> Object deleteItem(appId, env, clusterName, namespaceName, key, operator) +> deleteItem(appId, env, clusterName, namespaceName, key, operator) 删除配置项 (original openapi) @@ -295,8 +294,7 @@ public class Example { String key = "key_example"; // String | 配置项键名 String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.deleteItem(appId, env, clusterName, namespaceName, key, operator); - System.out.println(result); + apiInstance.deleteItem(appId, env, clusterName, namespaceName, key, operator); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#deleteItem"); System.err.println("Status code: " + e.getCode()); @@ -317,11 +315,11 @@ public class Example { | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | | **key** | **String**| 配置项键名 | | -| **operator** | **String**| 操作人用户名 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -330,7 +328,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | @@ -339,7 +337,7 @@ public class Example { # **deleteItemByEncodedKey** -> Object deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator) +> deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator) 通过编码的key删除配置项 (original openapi) @@ -374,8 +372,7 @@ public class Example { String key = "key_example"; // String | String operator = "operator_example"; // String | try { - Object result = apiInstance.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); - System.out.println(result); + apiInstance.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#deleteItemByEncodedKey"); System.err.println("Status code: " + e.getCode()); @@ -400,7 +397,7 @@ public class Example { ### Return type -**Object** +null (empty response body) ### Authorization @@ -409,20 +406,20 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | | - | - -# **findItemsByNamespace** -> OpenItemPageDTO findItemsByNamespace(appId, env, clusterName, namespaceName, page, size) + +# **findBranchItems** +> List<OpenItemDTO> findBranchItems(appId, env, clusterName, namespaceName, branchName) -获取命名空间下的配置项列表 (original openapi) +获取分支下的配置项 (new added) -获取指定命名空间的配置项列表,支持分页 +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: ### Example ```java @@ -450,13 +447,12 @@ public class Example { String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 - Integer page = 0; // Integer | 页码,从0开始 - Integer size = 50; // Integer | 每页数量 + String branchName = "branchName_example"; // String | 分支名称 try { - OpenItemPageDTO result = apiInstance.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); + List result = apiInstance.findBranchItems(appId, env, clusterName, namespaceName, branchName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#findItemsByNamespace"); + System.err.println("Exception when calling ItemManagementApi#findBranchItems"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -474,12 +470,11 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **page** | **Integer**| 页码,从0开始 | | -| **size** | **Integer**| 每页数量 | | +| **branchName** | **String**| 分支名称 | | ### Return type -[**OpenItemPageDTO**](OpenItemPageDTO.md) +[**List<OpenItemDTO>**](OpenItemDTO.md) ### Authorization @@ -493,16 +488,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取配置项列表 | - | -| **404** | 命名空间不存在 | - | +| **200** | 成功获取分支下的配置项列表 | - | +| **404** | 分支不存在 | - | - -# **getBranchItems** -> List<OpenItemDTO> getBranchItems(appId, env, clusterName, namespaceName, branchName) + +# **findItemsByNamespace** +> OpenItemPageDTO findItemsByNamespace(appId, env, clusterName, namespaceName, page, size) -获取分支下的配置项 (new added) +获取命名空间下的配置项列表 (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: +获取指定命名空间的配置项列表,支持分页 ### Example ```java @@ -530,12 +525,13 @@ public class Example { String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 + Integer page = 0; // Integer | 页码,从0开始 + Integer size = 50; // Integer | 每页数量 try { - List result = apiInstance.getBranchItems(appId, env, clusterName, namespaceName, branchName); + OpenItemPageDTO result = apiInstance.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#getBranchItems"); + System.err.println("Exception when calling ItemManagementApi#findItemsByNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -553,11 +549,12 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | +| **page** | **Integer**| 页码,从0开始 | | +| **size** | **Integer**| 每页数量 | | ### Return type -[**List<OpenItemDTO>**](OpenItemDTO.md) +[**OpenItemPageDTO**](OpenItemPageDTO.md) ### Authorization @@ -571,8 +568,8 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取分支下的配置项列表 | - | -| **404** | 分支不存在 | - | +| **200** | 成功获取配置项列表 | - | +| **404** | 命名空间不存在 | - | # **getItem** @@ -732,11 +729,11 @@ public class Example { # **revertItems** -> Object revertItems(appId, env, clusterName, namespaceName, operator) +> revertItems(appId, env, clusterName, namespaceName, operator) 撤销配置项更改 (new added) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation ### Example ```java @@ -766,8 +763,7 @@ public class Example { String namespaceName = "namespaceName_example"; // String | String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.revertItems(appId, env, clusterName, namespaceName, operator); - System.out.println(result); + apiInstance.revertItems(appId, env, clusterName, namespaceName, operator); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#revertItems"); System.err.println("Status code: " + e.getCode()); @@ -787,11 +783,11 @@ public class Example { | **env** | **String**| | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **operator** | **String**| 操作人用户名 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -811,11 +807,11 @@ public class Example { # **syncItems** -> Object syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel) +> syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator) 同步配置项到多个命名空间 (new added) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: ### Example ```java @@ -843,11 +839,10 @@ public class Example { String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | String namespaceName = "namespaceName_example"; // String | + OpenNamespaceSyncDTO openNamespaceSyncDTO = new OpenNamespaceSyncDTO(); // OpenNamespaceSyncDTO | String operator = "operator_example"; // String | 操作人用户名 - OpenNamespaceSyncModel openNamespaceSyncModel = new OpenNamespaceSyncModel(); // OpenNamespaceSyncModel | try { - Object result = apiInstance.syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); - System.out.println(result); + apiInstance.syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#syncItems"); System.err.println("Status code: " + e.getCode()); @@ -867,12 +862,12 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| | | | **namespaceName** | **String**| | | -| **operator** | **String**| 操作人用户名 | | -| **openNamespaceSyncModel** | [**OpenNamespaceSyncModel**](OpenNamespaceSyncModel.md)| | | +| **openNamespaceSyncDTO** | [**OpenNamespaceSyncDTO**](OpenNamespaceSyncDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -890,13 +885,13 @@ public class Example { | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | - -# **updateItem** -> Object updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) + +# **syntaxCheck** +> syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel) -更新配置项 (original openapi) +验证配置文本语法 (new added) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation ### Example ```java @@ -921,17 +916,14 @@ public class Example { 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 | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | + OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | try { - Object result = apiInstance.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - System.out.println(result); + apiInstance.syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#updateItem"); + System.err.println("Exception when calling ItemManagementApi#syntaxCheck"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -946,16 +938,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **key** | **String**| | | -| **createIfNotExists** | **Boolean**| | [default to false] | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | +| **env** | **String**| | | +| **clusterName** | **String**| | | +| **namespaceName** | **String**| | | +| **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | ### Return type -**Object** +null (empty response body) ### Authorization @@ -969,18 +959,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项更新成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | -| **404** | 配置项不存在 | - | +| **200** | 配置文本语法验证通过 | - | +| **400** | 配置文本语法错误 | - | - -# **updateItemByEncodedKey** -> Object updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO) + +# **updateItem** +> updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator) -通过编码的key更新配置项 (original openapi) +更新配置项 (original openapi) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} ### Example ```java @@ -1004,18 +992,18 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID + 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 | 配置项键名(需要URL编码) - Boolean createIfNotExists = false; // Boolean | 若不存在则创建(true/false) + String key = "key_example"; // String | + Boolean createIfNotExists = false; // Boolean | OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | + String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - System.out.println(result); + apiInstance.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#updateItemByEncodedKey"); + System.err.println("Exception when calling ItemManagementApi#updateItem"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1029,17 +1017,18 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | +| **appId** | **String**| | | | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **key** | **String**| 配置项键名(需要URL编码) | | -| **createIfNotExists** | **Boolean**| 若不存在则创建(true/false) | [default to false] | +| **key** | **String**| | | +| **createIfNotExists** | **Boolean**| | [default to false] | | **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -1053,18 +1042,18 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置项更新成功(编码key) | - | +| **200** | 配置项更新成功 | - | | **400** | 请求参数错误 | - | | **403** | 权限不足 | - | | **404** | 配置项不存在 | - | - -# **validateItems** -> Object validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel) + +# **updateItemByEncodedKey** +> updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator) -验证配置文本语法 (new added) +通过编码的key更新配置项 (original openapi) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} ### Example ```java @@ -1088,16 +1077,18 @@ public class Example { //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 | - OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | + String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String key = "key_example"; // String | 配置项键名(需要URL编码) + Boolean createIfNotExists = false; // Boolean | 若不存在则创建(true/false) + OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | + String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); - System.out.println(result); + apiInstance.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#validateItems"); + System.err.println("Exception when calling ItemManagementApi#updateItemByEncodedKey"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -1111,15 +1102,18 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | +| **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **key** | **String**| 配置项键名(需要URL编码) | | +| **createIfNotExists** | **Boolean**| 若不存在则创建(true/false) | [default to false] | +| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -1133,5 +1127,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 配置文本语法验证通过 | - | -| **400** | 配置文本语法错误 | - | +| **200** | 配置项更新成功(编码key) | - | +| **400** | 请求参数错误 | - | +| **403** | 权限不足 | - | +| **404** | 配置项不存在 | - | diff --git a/java-client/docs/MultiResponseEntity.md b/java-client/docs/MultiResponseEntity.md deleted file mode 100644 index bab0989..0000000 --- a/java-client/docs/MultiResponseEntity.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# MultiResponseEntity - -A response container holding multiple RichResponseEntity objects - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | Overall HTTP status code | | -|**entities** | [**List<RichResponseEntity>**](RichResponseEntity.md) | List of rich response entities | | diff --git a/java-client/docs/NamespaceBranchManagementApi.md b/java-client/docs/NamespaceBranchManagementApi.md index d9076d8..96cc466 100644 --- a/java-client/docs/NamespaceBranchManagementApi.md +++ b/java-client/docs/NamespaceBranchManagementApi.md @@ -8,7 +8,8 @@ All URIs are relative to *http://localhost* | [**deleteBranch**](NamespaceBranchManagementApi.md#deleteBranch) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) | | [**findBranch**](NamespaceBranchManagementApi.md#findBranch) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) | | [**getBranchGrayRules**](NamespaceBranchManagementApi.md#getBranchGrayRules) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) | -| [**mergeBranch**](NamespaceBranchManagementApi.md#mergeBranch) | **PATCH** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) | +| [**merge**](NamespaceBranchManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) | +| [**mergeBranch**](NamespaceBranchManagementApi.md#mergeBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) | | [**updateBranchRules**](NamespaceBranchManagementApi.md#updateBranchRules) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) | @@ -69,7 +70,7 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type @@ -91,7 +92,7 @@ public class Example { # **deleteBranch** -> Object deleteBranch(env, appId, clusterName, namespaceName, branchName, operator) +> deleteBranch(env, appId, clusterName, namespaceName, branchName, operator) 删除命名空间分支 (original openapi) @@ -126,8 +127,7 @@ public class Example { String branchName = "branchName_example"; // String | 分支名称 String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); - System.out.println(result); + apiInstance.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); } catch (ApiException e) { System.err.println("Exception when calling NamespaceBranchManagementApi#deleteBranch"); System.err.println("Status code: " + e.getCode()); @@ -152,7 +152,7 @@ public class Example { ### Return type -**Object** +null (empty response body) ### Authorization @@ -161,7 +161,7 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | @@ -170,7 +170,7 @@ public class Example { # **findBranch** -> OpenNamespaceDTO findBranch(appId, env, clusterName, namespaceName) +> OpenNamespaceDTO findBranch(appId, env, clusterName, namespaceName, extendInfo) 获取命名空间分支信息 (original openapi) @@ -202,8 +202,9 @@ public class Example { String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Boolean extendInfo = false; // Boolean | try { - OpenNamespaceDTO result = apiInstance.findBranch(appId, env, clusterName, namespaceName); + OpenNamespaceDTO result = apiInstance.findBranch(appId, env, clusterName, namespaceName, extendInfo); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling NamespaceBranchManagementApi#findBranch"); @@ -224,6 +225,7 @@ public class Example { | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | +| **extendInfo** | **Boolean**| | [optional] [default to false] | ### Return type @@ -321,13 +323,96 @@ public class Example { |-------------|-------------|------------------| | **200** | 成功获取灰度发布规则 | - | + +# **merge** +> OpenReleaseDTO merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO) + +合并分支 (original openapi) + +合并灰度分支并可选择删除分支 + +### 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 | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + String branchName = "branchName_example"; // String | 分支名称 + Boolean deleteBranch = true; // Boolean | 合并后是否删除分支(true/false) + NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | + try { + OpenReleaseDTO result = apiInstance.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NamespaceBranchManagementApi#merge"); + 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**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **branchName** | **String**| 分支名称 | | +| **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | +| **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** | 权限不足 | - | + # **mergeBranch** -> OpenReleaseDTO mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO) +> OpenReleaseDTO mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator) 合并分支到主分支 (new added) -PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} ### Example ```java @@ -357,10 +442,10 @@ public class Example { String namespaceName = "namespaceName_example"; // String | 命名空间名称 String branchName = "branchName_example"; // String | 分支名称 Boolean deleteBranch = true; // Boolean | 合并后是否删除分支(true/false) - String operator = "operator_example"; // String | 操作人用户名 NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | + String operator = "operator_example"; // String | 操作人用户名 try { - OpenReleaseDTO result = apiInstance.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); + OpenReleaseDTO result = apiInstance.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling NamespaceBranchManagementApi#mergeBranch"); @@ -383,8 +468,8 @@ public class Example { | **namespaceName** | **String**| 命名空间名称 | | | **branchName** | **String**| 分支名称 | | | **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | -| **operator** | **String**| 操作人用户名 | | | **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type @@ -406,7 +491,7 @@ public class Example { # **updateBranchRules** -> Object updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO) +> updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO) 更新分支灰度发布规则 (original openapi) @@ -442,8 +527,7 @@ public class Example { String operator = "operator_example"; // String | 操作人用户名 OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = new OpenGrayReleaseRuleDTO(); // OpenGrayReleaseRuleDTO | try { - Object result = apiInstance.updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - System.out.println(result); + apiInstance.updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); } catch (ApiException e) { System.err.println("Exception when calling NamespaceBranchManagementApi#updateBranchRules"); System.err.println("Status code: " + e.getCode()); @@ -469,7 +553,7 @@ public class Example { ### Return type -**Object** +null (empty response body) ### Authorization @@ -478,7 +562,7 @@ public class Example { ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | diff --git a/java-client/docs/NamespaceLockManagementApi.md b/java-client/docs/NamespaceLockManagementApi.md new file mode 100644 index 0000000..d6d17f8 --- /dev/null +++ b/java-client/docs/NamespaceLockManagementApi.md @@ -0,0 +1,83 @@ +# NamespaceLockManagementApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getNamespaceLock**](NamespaceLockManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) | + + + +# **getNamespaceLock** +> OpenNamespaceLockDTO getNamespaceLock(appId, env, clusterName, namespaceName) + +获取Namespace的锁状态 (original openapi) + +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.NamespaceLockManagementApi; + +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"); + + NamespaceLockManagementApi apiInstance = new NamespaceLockManagementApi(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.getNamespaceLock(appId, env, clusterName, namespaceName); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling NamespaceLockManagementApi#getNamespaceLock"); + 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/NamespaceManagementApi.md b/java-client/docs/NamespaceManagementApi.md index 7ae7579..889de88 100644 --- a/java-client/docs/NamespaceManagementApi.md +++ b/java-client/docs/NamespaceManagementApi.md @@ -4,28 +4,24 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**checkNamespaceIntegrity**](NamespaceManagementApi.md#checkNamespaceIntegrity) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) | -| [**createNamespace**](NamespaceManagementApi.md#createNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) | -| [**deleteAppNamespace**](NamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) | -| [**deleteNamespaceLinks**](NamespaceManagementApi.md#deleteNamespaceLinks) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) | +| [**createMissingNamespaces**](NamespaceManagementApi.md#createMissingNamespaces) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) | +| [**createNamespaces**](NamespaceManagementApi.md#createNamespaces) | **POST** /openapi/v1/namespaces | 创建Namespace (new added) | +| [**deleteNamespace**](NamespaceManagementApi.md#deleteNamespace) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) | +| [**findMissingNamespaces**](NamespaceManagementApi.md#findMissingNamespaces) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) | +| [**findNamespace**](NamespaceManagementApi.md#findNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) | +| [**findNamespaceUsage**](NamespaceManagementApi.md#findNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) | | [**findNamespaces**](NamespaceManagementApi.md#findNamespaces) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) | -| [**getAppNamespace**](NamespaceManagementApi.md#getAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) | -| [**getAppNamespaces**](NamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) | -| [**getAppNamespacesByApp**](NamespaceManagementApi.md#getAppNamespacesByApp) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) | -| [**getNamespaceLock**](NamespaceManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) | +| [**findPublicNamespaceForAssociatedNamespace**](NamespaceManagementApi.md#findPublicNamespaceForAssociatedNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) | | [**getNamespacesReleaseStatus**](NamespaceManagementApi.md#getNamespacesReleaseStatus) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) | -| [**getPublicAppNamespaceInstances**](NamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) | -| [**getPublicNamespaceAssociation**](NamespaceManagementApi.md#getPublicNamespaceAssociation) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) | -| [**loadNamespace**](NamespaceManagementApi.md#loadNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) | - -# **checkNamespaceIntegrity** -> List<String> checkNamespaceIntegrity(appId, env, clusterName) + +# **createMissingNamespaces** +> Object createMissingNamespaces(appId, env, clusterName, operator) -检查缺失的Namespace (new added) +创建缺失的Namespace (new added) -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check +POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces ### Example ```java @@ -52,11 +48,12 @@ public class Example { String appId = "appId_example"; // String | 应用ID String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 + String operator = "operator_example"; // String | 操作人用户名 try { - List result = apiInstance.checkNamespaceIntegrity(appId, env, clusterName); + Object result = apiInstance.createMissingNamespaces(appId, env, clusterName, operator); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#checkNamespaceIntegrity"); + System.err.println("Exception when calling NamespaceManagementApi#createMissingNamespaces"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -73,10 +70,11 @@ public class Example { | **appId** | **String**| 应用ID | | | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**List<String>** +**Object** ### Authorization @@ -90,15 +88,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 缺失的命名空间名称列表 | - | +| **200** | 缺失的命名空间创建成功 | - | - -# **createNamespace** -> OpenAppNamespaceDTO createNamespace(appId, openAppNamespaceDTO) + +# **createNamespaces** +> createNamespaces(openCreateNamespaceDTO, operator) -创建AppNamespace (original openapi) +创建Namespace (new added) -POST /openapi/v1/apps/{appId}/appnamespaces +POST /openapi/v1/apps/{appId}/namespaces ### Example ```java @@ -122,13 +120,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenAppNamespaceDTO openAppNamespaceDTO = new OpenAppNamespaceDTO(); // OpenAppNamespaceDTO | + List openCreateNamespaceDTO = Arrays.asList(); // List | + String operator = "operator_example"; // String | 操作人用户名 try { - OpenAppNamespaceDTO result = apiInstance.createNamespace(appId, openAppNamespaceDTO); - System.out.println(result); + apiInstance.createNamespaces(openCreateNamespaceDTO, operator); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#createNamespace"); + System.err.println("Exception when calling NamespaceManagementApi#createNamespaces"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -142,12 +139,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openAppNamespaceDTO** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | | +| **openCreateNamespaceDTO** | [**List<OpenCreateNamespaceDTO>**](OpenCreateNamespaceDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) +null (empty response body) ### Authorization @@ -156,22 +153,20 @@ public class Example { ### HTTP request headers - **Content-Type**: application/json - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | AppNamespace创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | +| **200** | Namespace创建成功 | - | - -# **deleteAppNamespace** -> Object deleteAppNamespace(appId, namespaceName, operator) + +# **deleteNamespace** +> deleteNamespace(appId, env, clusterName, namespaceName, operator) -删除AppNamespace (new added) +删除指定的Namespace (new added) -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} +DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} ### Example ```java @@ -196,13 +191,14 @@ public class Example { NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.deleteAppNamespace(appId, namespaceName, operator); - System.out.println(result); + apiInstance.deleteNamespace(appId, env, clusterName, namespaceName, operator); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#deleteAppNamespace"); + System.err.println("Exception when calling NamespaceManagementApi#deleteNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -217,12 +213,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -**Object** +null (empty response body) ### Authorization @@ -231,20 +229,20 @@ public class Example { ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/json + - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | AppNamespace删除成功 | - | +| **200** | 解除关联成功 | - | - -# **deleteNamespaceLinks** -> Object deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator) + +# **findMissingNamespaces** +> List<String> findMissingNamespaces(appId, env, clusterName) -删除关联的Namespace (new added) +查找缺失的Namespace (new added) -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces ### Example ```java @@ -271,13 +269,11 @@ public class Example { String appId = "appId_example"; // String | 应用ID String env = "env_example"; // String | 环境标识 String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator); + List result = apiInstance.findMissingNamespaces(appId, env, clusterName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#deleteNamespaceLinks"); + System.err.println("Exception when calling NamespaceManagementApi#findMissingNamespaces"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -294,12 +290,10 @@ public class Example { | **appId** | **String**| 应用ID | | | **env** | **String**| 环境标识 | | | **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | | ### Return type -**Object** +**List<String>** ### Authorization @@ -313,15 +307,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 解除关联成功 | - | +| **200** | 缺失的命名空间名称列表 | - | - -# **findNamespaces** -> List<OpenNamespaceDTO> findNamespaces(appId, env, clusterName, fillItemDetail) + +# **findNamespace** +> OpenNamespaceDTO findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo) -获取指定集群下的所有Namespace (original openapi) +获取指定的Namespace (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} ### Example ```java @@ -348,12 +342,14 @@ public class Example { String appId = "appId_example"; // String | String env = "env_example"; // String | String clusterName = "clusterName_example"; // String | + String namespaceName = "namespaceName_example"; // String | Boolean fillItemDetail = true; // Boolean | + Boolean extendInfo = false; // Boolean | try { - List result = apiInstance.findNamespaces(appId, env, clusterName, fillItemDetail); + OpenNamespaceDTO result = apiInstance.findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#findNamespaces"); + System.err.println("Exception when calling NamespaceManagementApi#findNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -370,11 +366,13 @@ public class Example { | **appId** | **String**| | | | **env** | **String**| | | | **clusterName** | **String**| | | +| **namespaceName** | **String**| | | | **fillItemDetail** | **Boolean**| | [default to true] | +| **extendInfo** | **Boolean**| | [optional] [default to false] | ### Return type -[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) +[**OpenNamespaceDTO**](OpenNamespaceDTO.md) ### Authorization @@ -390,13 +388,13 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **getAppNamespace** -> OpenAppNamespaceDTO getAppNamespace(appId, namespaceName) + +# **findNamespaceUsage** +> List<OpenNamespaceUsageDTO> findNamespaceUsage(appId, env, clusterName, namespaceName) -获取指定的AppNamespace (new added) +查询namespace使用情况(new added) -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage ### Example ```java @@ -421,12 +419,14 @@ public class Example { NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); String appId = "appId_example"; // String | 应用ID + String env = "env_example"; // String | 环境标识 + String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 try { - OpenAppNamespaceDTO result = apiInstance.getAppNamespace(appId, namespaceName); + List result = apiInstance.findNamespaceUsage(appId, env, clusterName, namespaceName); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#getAppNamespace"); + System.err.println("Exception when calling NamespaceManagementApi#findNamespaceUsage"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -441,11 +441,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| 应用ID | | +| **env** | **String**| 环境标识 | | +| **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | ### Return type -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) +[**List<OpenNamespaceUsageDTO>**](OpenNamespaceUsageDTO.md) ### Authorization @@ -459,84 +461,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取AppNamespace | - | - - -# **getAppNamespaces** -> List<OpenAppNamespaceDTO> getAppNamespaces(publicOnly) - -获取所有公共AppNamespace (new added) +| **200** | NamespaceUsage查询成功 | - | -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.getAppNamespaces(publicOnly); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#getAppNamespaces"); - 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** | | - | - - -# **getAppNamespacesByApp** -> List<OpenAppNamespaceDTO> getAppNamespacesByApp(appId) + +# **findNamespaces** +> List<OpenNamespaceDTO> findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo) -获取指定应用的AppNamespace (new added) +获取指定集群下的所有Namespace (original openapi) -GET /openapi/v1/apps/{appId}/appnamespaces +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces ### Example ```java @@ -561,11 +494,15 @@ public class Example { NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); String appId = "appId_example"; // String | + String env = "env_example"; // String | + String clusterName = "clusterName_example"; // String | + Boolean fillItemDetail = true; // Boolean | + Boolean extendInfo = false; // Boolean | try { - List result = apiInstance.getAppNamespacesByApp(appId); + List result = apiInstance.findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#getAppNamespacesByApp"); + System.err.println("Exception when calling NamespaceManagementApi#findNamespaces"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -580,10 +517,14 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| | | +| **env** | **String**| | | +| **clusterName** | **String**| | | +| **fillItemDetail** | **Boolean**| | [default to true] | +| **extendInfo** | **Boolean**| | [optional] [default to false] | ### Return type -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) +[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) ### Authorization @@ -599,13 +540,13 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **getNamespaceLock** -> OpenNamespaceLockDTO getNamespaceLock(appId, env, clusterName, namespaceName) + +# **findPublicNamespaceForAssociatedNamespace** +> OpenNamespaceDTO findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo) -获取Namespace的锁状态 (original openapi) +查询关联Namespace对应的公共Namespace详情 (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace ### Example ```java @@ -629,15 +570,16 @@ public class Example { //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 | + String env = "env_example"; // String | 环境标识 + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 关联Namespace名称 + Boolean extendInfo = false; // Boolean | try { - OpenNamespaceLockDTO result = apiInstance.getNamespaceLock(appId, env, clusterName, namespaceName); + OpenNamespaceDTO result = apiInstance.findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#getNamespaceLock"); + System.err.println("Exception when calling NamespaceManagementApi#findPublicNamespaceForAssociatedNamespace"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -651,14 +593,15 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | +| **env** | **String**| 环境标识 | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 关联Namespace名称 | | +| **extendInfo** | **Boolean**| | [optional] [default to false] | ### Return type -[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) +[**OpenNamespaceDTO**](OpenNamespaceDTO.md) ### Authorization @@ -672,7 +615,7 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | +| **200** | 成功获取关联的公共Namespace详情 | - | # **getNamespacesReleaseStatus** @@ -742,230 +685,3 @@ public class Example { | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | 成功获取发布状态映射 | - | - - -# **getPublicAppNamespaceInstances** -> List<OpenNamespaceDTO> getPublicAppNamespaceInstances(env, publicNamespaceName, page, size) - -获取公共AppNamespace的所有实例 (new added) - -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 | 页码,从0开始 - Integer size = 10; // Integer | 每页数量 - try { - List result = apiInstance.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#getPublicAppNamespaceInstances"); - 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**| 页码,从0开始 | | -| **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** | 成功获取实例列表 | - | - - -# **getPublicNamespaceAssociation** -> OpenNamespaceDTO getPublicNamespaceAssociation(appId, env, clusterName, namespaceName) - -获取关联的公共Namespace (new added) - -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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - try { - OpenNamespaceDTO result = apiInstance.getPublicNamespaceAssociation(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#getPublicNamespaceAssociation"); - 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**| 应用ID | | -| **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** | 成功获取关联的公共Namespace | - | - - -# **loadNamespace** -> OpenNamespaceDTO loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail) - -获取指定的Namespace (original openapi) - -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.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 | - Boolean fillItemDetail = true; // Boolean | - try { - OpenNamespaceDTO result = apiInstance.loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#loadNamespace"); - 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**| | [default to true] | - -### 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/OpenCreateItemDTO.md b/java-client/docs/OpenCreateItemDTO.md new file mode 100644 index 0000000..84e6188 --- /dev/null +++ b/java-client/docs/OpenCreateItemDTO.md @@ -0,0 +1,13 @@ + + +# OpenCreateItemDTO + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] | +|**type** | **Integer** | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] | +|**value** | **String** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] | +|**comment** | **String** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] | diff --git a/java-client/docs/OpenCreateNamespaceDTO.md b/java-client/docs/OpenCreateNamespaceDTO.md new file mode 100644 index 0000000..900e4b3 --- /dev/null +++ b/java-client/docs/OpenCreateNamespaceDTO.md @@ -0,0 +1,14 @@ + + +# OpenCreateNamespaceDTO + +Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**appId** | **String** | 所属应用的唯一标识符 | [optional] | +|**env** | **String** | 所在那个环境创建 | [optional] | +|**clusterName** | **String** | 所属集群的名称 | [optional] | +|**appNamespaceName** | **String** | 根据已创建的appnamespace来实例化namespace | [optional] | diff --git a/java-client/docs/OpenGrayReleaseRuleDTO.md b/java-client/docs/OpenGrayReleaseRuleDTO.md index 47438ff..98829fa 100644 --- a/java-client/docs/OpenGrayReleaseRuleDTO.md +++ b/java-client/docs/OpenGrayReleaseRuleDTO.md @@ -16,4 +16,4 @@ Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则 |**clusterName** | **String** | 所属集群的名称 | [optional] | |**namespaceName** | **String** | 所属命名空间的名称 | [optional] | |**branchName** | **String** | 灰度分支名称,标识灰度发布的分支 | [optional] | -|**ruleItems** | [**List<OpenGrayReleaseRuleItemDTO>**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] | +|**ruleItems** | [**Set<OpenGrayReleaseRuleItemDTO>**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] | diff --git a/java-client/docs/OpenGrayReleaseRuleItemDTO.md b/java-client/docs/OpenGrayReleaseRuleItemDTO.md index b8de303..b70290f 100644 --- a/java-client/docs/OpenGrayReleaseRuleItemDTO.md +++ b/java-client/docs/OpenGrayReleaseRuleItemDTO.md @@ -9,5 +9,5 @@ Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规 | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**clientAppId** | **String** | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] | -|**clientIpList** | **List<String>** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] | -|**clientLabelList** | **List<String>** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] | +|**clientIpList** | **Set<String>** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] | +|**clientLabelList** | **Set<String>** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] | diff --git a/java-client/docs/OpenItemDTO.md b/java-client/docs/OpenItemDTO.md index 8777f9a..98419b9 100644 --- a/java-client/docs/OpenItemDTO.md +++ b/java-client/docs/OpenItemDTO.md @@ -2,17 +2,18 @@ # OpenItemDTO -Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 +Apollo配置项核心数据对象,仅包含键值及基础审计信息 ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**key** | **String** | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] | +|**value** | **String** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] | +|**type** | **Integer** | 配置项类型 | [optional] | +|**comment** | **String** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] | +|**extendInfo** | [**OpenItemExtendDTO**](OpenItemExtendDTO.md) | | [optional] | |**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/OpenItemDiffDTO.md b/java-client/docs/OpenItemDiffDTO.md new file mode 100644 index 0000000..d2333b5 --- /dev/null +++ b/java-client/docs/OpenItemDiffDTO.md @@ -0,0 +1,15 @@ + + +# OpenItemDiffDTO + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | 查找结果 | [optional] | +|**message** | **String** | 查找结果信息 | [optional] | +|**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] | +|**createItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | | [optional] | +|**deleteItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | | [optional] | +|**updateItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | | [optional] | diff --git a/java-client/docs/OpenItemDiffs.md b/java-client/docs/OpenItemDiffs.md deleted file mode 100644 index 824dd58..0000000 --- a/java-client/docs/OpenItemDiffs.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OpenItemDiffs - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] | -|**diffs** | [**OpenItemChangeSets**](OpenItemChangeSets.md) | | [optional] | -|**extInfo** | **String** | 扩展信息 | [optional] | diff --git a/java-client/docs/OpenItemExtendDTO.md b/java-client/docs/OpenItemExtendDTO.md new file mode 100644 index 0000000..2d0651f --- /dev/null +++ b/java-client/docs/OpenItemExtendDTO.md @@ -0,0 +1,16 @@ + + +# OpenItemExtendDTO + +Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**namespaceId** | **Long** | 所属命名空间的ID | [optional] | +|**isModified** | **Boolean** | 是否有未发布的修改 | [optional] | +|**isDeleted** | **Boolean** | 是否被标记为删除(未发布) | [optional] | +|**isNewlyAdded** | **Boolean** | 是否为新添加的配置项(未发布) | [optional] | +|**newValue** | **String** | 新的值 | [optional] | +|**oldValue** | **String** | 上一次发布的值,用于对比变更 | [optional] | diff --git a/java-client/docs/OpenNamespaceDTO.md b/java-client/docs/OpenNamespaceDTO.md index f4e0cf9..3ee97cc 100644 --- a/java-client/docs/OpenNamespaceDTO.md +++ b/java-client/docs/OpenNamespaceDTO.md @@ -19,3 +19,4 @@ Apollo命名空间数据传输对象,表示一个完整的命名空间及其 |**format** | **String** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] | |**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | |**items** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 命名空间包含的配置项列表 | [optional] | +|**extendInfo** | [**OpenNamespaceExtendDTO**](OpenNamespaceExtendDTO.md) | | [optional] | diff --git a/java-client/docs/OpenNamespaceExtendDTO.md b/java-client/docs/OpenNamespaceExtendDTO.md new file mode 100644 index 0000000..6d37e2e --- /dev/null +++ b/java-client/docs/OpenNamespaceExtendDTO.md @@ -0,0 +1,12 @@ + + +# OpenNamespaceExtendDTO + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isConfigHidden** | **Boolean** | 当当前用户无权限查看配置时置为 true | [optional] | +|**parentAppId** | **String** | 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 | [optional] | +|**itemModifiedCnt** | **Integer** | 未发布变更数 | [optional] | diff --git a/java-client/docs/OpenNamespaceLockDTO.md b/java-client/docs/OpenNamespaceLockDTO.md index ae01bd8..8eddba0 100644 --- a/java-client/docs/OpenNamespaceLockDTO.md +++ b/java-client/docs/OpenNamespaceLockDTO.md @@ -11,3 +11,4 @@ Apollo命名空间锁状态数据传输对象 |**namespaceName** | **String** | 命名空间名称 | [optional] | |**isLocked** | **Boolean** | 是否被锁定 | [optional] | |**lockedBy** | **String** | 锁定者用户名 | [optional] | +|**isEmergencyPublishAllowed** | **Boolean** | 是否允许紧急发布 | [optional] | diff --git a/java-client/docs/OpenNamespaceSyncModel.md b/java-client/docs/OpenNamespaceSyncDTO.md similarity index 81% rename from java-client/docs/OpenNamespaceSyncModel.md rename to java-client/docs/OpenNamespaceSyncDTO.md index 08aaa11..de6ccba 100644 --- a/java-client/docs/OpenNamespaceSyncModel.md +++ b/java-client/docs/OpenNamespaceSyncDTO.md @@ -1,6 +1,6 @@ -# OpenNamespaceSyncModel +# OpenNamespaceSyncDTO ## Properties @@ -8,4 +8,4 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**syncToNamespaces** | [**List<OpenNamespaceIdentifier>**](OpenNamespaceIdentifier.md) | 目标命名空间标识列表 | [optional] | -|**syncItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 需要同步的配置项列表 | [optional] | +|**syncItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 需要修改的配置项列表 | [optional] | diff --git a/java-client/docs/OpenNamespaceUsageDTO.md b/java-client/docs/OpenNamespaceUsageDTO.md new file mode 100644 index 0000000..bdda896 --- /dev/null +++ b/java-client/docs/OpenNamespaceUsageDTO.md @@ -0,0 +1,17 @@ + + +# OpenNamespaceUsageDTO + +命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**namespaceName** | **String** | 命名空间名称 | [optional] | +|**appId** | **String** | 所属应用的唯一标识符 | [optional] | +|**clusterName** | **String** | 所属集群名称 | [optional] | +|**envName** | **String** | 环境名称 | [optional] | +|**instanceCount** | **Integer** | 该命名空间关联的实例数量 | [optional] | +|**branchInstanceCount** | **Integer** | 分支命名空间关联的实例数量 | [optional] | +|**linkedNamespaceCount** | **Integer** | 关联到该公共命名空间的命名空间数量 | [optional] | diff --git a/java-client/docs/ReleaseManagementApi.md b/java-client/docs/ReleaseManagementApi.md index d41f6d9..506bfc8 100644 --- a/java-client/docs/ReleaseManagementApi.md +++ b/java-client/docs/ReleaseManagementApi.md @@ -11,7 +11,6 @@ All URIs are relative to *http://localhost* | [**findAllReleases**](ReleaseManagementApi.md#findAllReleases) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) | | [**getReleaseById**](ReleaseManagementApi.md#getReleaseById) | **GET** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) | | [**loadLatestActiveRelease**](ReleaseManagementApi.md#loadLatestActiveRelease) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) | -| [**merge**](ReleaseManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) | | [**rollback**](ReleaseManagementApi.md#rollback) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) | @@ -557,89 +556,6 @@ public class Example { | **200** | 成功获取最新活跃发布 | - | | **404** | 未找到活跃发布 | - | - -# **merge** -> OpenReleaseDTO merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO) - -合并分支 (original openapi) - -合并灰度分支并可选择删除分支 - -### 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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 - Boolean deleteBranch = true; // Boolean | 合并后是否删除分支(true/false) - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#merge"); - 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**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | -| **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | -| **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** | 权限不足 | - | - # **rollback** > Object rollback(env, releaseId, operator) @@ -693,7 +609,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **env** | **String**| 环境标识 | | | **releaseId** | **Long**| 发布ID | | -| **operator** | **String**| 操作人用户名 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type diff --git a/java-client/docs/RichResponseEntity.md b/java-client/docs/RichResponseEntity.md deleted file mode 100644 index 2de3a85..0000000 --- a/java-client/docs/RichResponseEntity.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# RichResponseEntity - -A wrapper for a single response entity with code, message, and body - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | HTTP status code | | -|**message** | **Object** | Response message (can be string or object) | | -|**body** | **Object** | Response payload (generic type T) | [optional] | diff --git a/java-client/src/main/java/org/openapitools/client/JSON.java b/java-client/src/main/java/org/openapitools/client/JSON.java index b44cd39..0f8e325 100644 --- a/java-client/src/main/java/org/openapitools/client/JSON.java +++ b/java-client/src/main/java/org/openapitools/client/JSON.java @@ -95,13 +95,14 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExceptionResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.KVEntity.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MultiResponseEntity.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceGrayDelReleaseDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceReleaseDTO.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.OpenCreateItemDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenCreateNamespaceDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenGrayReleaseRuleDTO.CustomTypeAdapterFactory()); @@ -111,18 +112,20 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstancePageDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemChangeSets.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemDiffs.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemDiffDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemExtendDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemPageDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenMissEnvDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceExtendDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceIdentifier.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceLockDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceSyncModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceSyncDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceTextModel.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceUsageDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenOrganizationDto.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseBO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichResponseEntity.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } 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 index 1cd6a54..fd79da8 100644 --- a/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java @@ -1330,7 +1330,7 @@ private okhttp3.Call getEnvClustersValidateBeforeCall(String appId, final ApiCal /** * 获取应用的环境集群信息 (original openapi) - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * @param appId 应用ID (required) * @return List<OpenEnvClusterDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1348,7 +1348,7 @@ public List getEnvClusters(String appId) throws ApiException /** * 获取应用的环境集群信息 (original openapi) - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * @param appId 应用ID (required) * @return ApiResponse<List<OpenEnvClusterDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1367,7 +1367,7 @@ public ApiResponse> getEnvClustersWithHttpInfo(String ap /** * 获取应用的环境集群信息 (original openapi) (asynchronously) - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * @param appId 应用ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java new file mode 100644 index 0000000..df28c50 --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java @@ -0,0 +1,1033 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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.ExceptionResponse; +import org.openapitools.client.model.OpenAppNamespaceDTO; +import org.openapitools.client.model.OpenNamespaceDTO; +import org.openapitools.client.model.OpenNamespaceUsageDTO; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class AppNamespaceManagementApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public AppNamespaceManagementApi() { + this(Configuration.getDefaultApiClient()); + } + + public AppNamespaceManagementApi(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 createAppNamespace + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param operator 操作人用户名 (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 + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call createAppNamespaceCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, 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 = 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(); + + 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 = { + "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 createAppNamespaceValidateBeforeCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, 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 createAppNamespace(Async)"); + } + + // verify the required parameter 'openAppNamespaceDTO' is set + if (openAppNamespaceDTO == null) { + throw new ApiException("Missing the required parameter 'openAppNamespaceDTO' when calling createAppNamespace(Async)"); + } + + return createAppNamespaceCall(appId, openAppNamespaceDTO, operator, _callback); + + } + + /** + * 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return OpenAppNamespaceDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public OpenAppNamespaceDTO createAppNamespace(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator) throws ApiException { + ApiResponse localVarResp = createAppNamespaceWithHttpInfo(appId, openAppNamespaceDTO, operator); + return localVarResp.getData(); + } + + /** + * 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return ApiResponse<OpenAppNamespaceDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public ApiResponse createAppNamespaceWithHttpInfo(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = createAppNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 创建AppNamespace (original openapi) (asynchronously) + * POST /openapi/v1/apps/{appId}/appnamespaces + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param operator 操作人用户名 (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 + + + + + +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call createAppNamespaceAsync(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createAppNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteAppNamespace + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (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 + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, 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/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(); + + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + + final String[] localVarAccepts = { + }; + 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 deleteAppNamespaceValidateBeforeCall(String appId, String namespaceName, 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 deleteAppNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteAppNamespace(Async)"); + } + + return deleteAppNamespaceCall(appId, namespaceName, operator, _callback); + + } + + /** + * 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public void deleteAppNamespace(String appId, String namespaceName, String operator) throws ApiException { + deleteAppNamespaceWithHttpInfo(appId, namespaceName, operator); + } + + /** + * 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public ApiResponse deleteAppNamespaceWithHttpInfo(String appId, String namespaceName, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * 删除AppNamespace (new added) (asynchronously) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (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 + + + +
Status Code Description Response Headers
200 AppNamespace删除成功 -
+ */ + public okhttp3.Call deleteAppNamespaceAsync(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for findAppNamespace + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 成功获取AppNamespace -
+ */ + public okhttp3.Call findAppNamespaceCall(String appId, String namespaceName, Boolean extendInfo, 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(); + + if (extendInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); + } + + 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 findAppNamespaceValidateBeforeCall(String appId, String namespaceName, Boolean extendInfo, 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 findAppNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling findAppNamespace(Async)"); + } + + return findAppNamespaceCall(appId, namespaceName, extendInfo, _callback); + + } + + /** + * 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) + * @return OpenAppNamespaceDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 成功获取AppNamespace -
+ */ + public OpenAppNamespaceDTO findAppNamespace(String appId, String namespaceName, Boolean extendInfo) throws ApiException { + ApiResponse localVarResp = findAppNamespaceWithHttpInfo(appId, namespaceName, extendInfo); + return localVarResp.getData(); + } + + /** + * 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) + * @return ApiResponse<OpenAppNamespaceDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 成功获取AppNamespace -
+ */ + public ApiResponse findAppNamespaceWithHttpInfo(String appId, String namespaceName, Boolean extendInfo) throws ApiException { + okhttp3.Call localVarCall = findAppNamespaceValidateBeforeCall(appId, namespaceName, extendInfo, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 获取指定的AppNamespace (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 成功获取AppNamespace -
+ */ + public okhttp3.Call findAppNamespaceAsync(String appId, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = findAppNamespaceValidateBeforeCall(appId, namespaceName, extendInfo, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for findAppNamespaceUsage + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
+ */ + public okhttp3.Call findAppNamespaceUsageCall(String appId, 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}/usage" + .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 findAppNamespaceUsageValidateBeforeCall(String appId, 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 findAppNamespaceUsage(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling findAppNamespaceUsage(Async)"); + } + + return findAppNamespaceUsageCall(appId, namespaceName, _callback); + + } + + /** + * 查询appnamespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return List<OpenNamespaceUsageDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
+ */ + public List findAppNamespaceUsage(String appId, String namespaceName) throws ApiException { + ApiResponse> localVarResp = findAppNamespaceUsageWithHttpInfo(appId, namespaceName); + return localVarResp.getData(); + } + + /** + * 查询appnamespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return ApiResponse<List<OpenNamespaceUsageDTO>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
+ */ + public ApiResponse> findAppNamespaceUsageWithHttpInfo(String appId, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = findAppNamespaceUsageValidateBeforeCall(appId, namespaceName, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 查询appnamespace使用情况(new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
+ */ + public okhttp3.Call findAppNamespaceUsageAsync(String appId, String namespaceName, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = findAppNamespaceUsageValidateBeforeCall(appId, namespaceName, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAppNamespaces + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call getAppNamespacesCall(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(); + + 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 getAppNamespacesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return getAppNamespacesCall(_callback); + + } + + /** + * 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces/public + * @return List<OpenAppNamespaceDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public List getAppNamespaces() throws ApiException { + ApiResponse> localVarResp = getAppNamespacesWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces/public + * @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 + + + +
Status Code Description Response Headers
200 -
+ */ + public ApiResponse> getAppNamespacesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 获取所有公共AppNamespace (new added) (asynchronously) + * GET /openapi/v1/appnamespaces/public + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call getAppNamespacesAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getAppNamespacesByAppId + * @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 + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call getAppNamespacesByAppIdCall(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 getAppNamespacesByAppIdValidateBeforeCall(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 getAppNamespacesByAppId(Async)"); + } + + return getAppNamespacesByAppIdCall(appId, _callback); + + } + + /** + * 获取指定应用的AppNamespace (new added) + * 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 + + + +
Status Code Description Response Headers
200 -
+ */ + public List getAppNamespacesByAppId(String appId) throws ApiException { + ApiResponse> localVarResp = getAppNamespacesByAppIdWithHttpInfo(appId); + return localVarResp.getData(); + } + + /** + * 获取指定应用的AppNamespace (new added) + * 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 + + + +
Status Code Description Response Headers
200 -
+ */ + public ApiResponse> getAppNamespacesByAppIdWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getAppNamespacesByAppIdValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 获取指定应用的AppNamespace (new added) (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 + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call getAppNamespacesByAppIdAsync(String appId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getAppNamespacesByAppIdValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getPublicAppNamespaceInstances + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 成功获取实例列表 -
+ */ + public okhttp3.Call getPublicAppNamespaceInstancesCall(String env, String publicNamespaceName, Integer page, 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 getPublicAppNamespaceInstancesValidateBeforeCall(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling getPublicAppNamespaceInstances(Async)"); + } + + // verify the required parameter 'publicNamespaceName' is set + if (publicNamespaceName == null) { + throw new ApiException("Missing the required parameter 'publicNamespaceName' when calling getPublicAppNamespaceInstances(Async)"); + } + + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling getPublicAppNamespaceInstances(Async)"); + } + + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling getPublicAppNamespaceInstances(Async)"); + } + + return getPublicAppNamespaceInstancesCall(env, publicNamespaceName, page, size, _callback); + + } + + /** + * 获取公共AppNamespace的所有实例 (new added) + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (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 + + + +
Status Code Description Response Headers
200 成功获取实例列表 -
+ */ + public List getPublicAppNamespaceInstances(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { + ApiResponse> localVarResp = getPublicAppNamespaceInstancesWithHttpInfo(env, publicNamespaceName, page, size); + return localVarResp.getData(); + } + + /** + * 获取公共AppNamespace的所有实例 (new added) + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (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 + + + +
Status Code Description Response Headers
200 成功获取实例列表 -
+ */ + public ApiResponse> getPublicAppNamespaceInstancesWithHttpInfo(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 获取公共AppNamespace的所有实例 (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 成功获取实例列表 -
+ */ + public okhttp3.Call getPublicAppNamespaceInstancesAsync(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, 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 index 9d1c87f..46bb6d2 100644 --- a/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java @@ -29,9 +29,9 @@ import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenItemDiffs; +import org.openapitools.client.model.OpenItemDiffDTO; import org.openapitools.client.model.OpenItemPageDTO; -import org.openapitools.client.model.OpenNamespaceSyncModel; +import org.openapitools.client.model.OpenNamespaceSyncDTO; import org.openapitools.client.model.OpenNamespaceTextModel; import java.lang.reflect.Type; @@ -84,8 +84,8 @@ public void setCustomBaseUrl(String customBaseUrl) { * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) * @param openNamespaceTextModel (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -96,7 +96,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 403 权限不足 - */ - public okhttp3.Call batchUpdateItemsByTextCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call batchUpdateItemsByTextCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -113,7 +113,7 @@ public okhttp3.Call batchUpdateItemsByTextCall(String appId, String env, String Object localVarPostBody = openNamespaceTextModel; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate" + 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())) @@ -150,7 +150,7 @@ public okhttp3.Call batchUpdateItemsByTextCall(String appId, String env, String } @SuppressWarnings("rawtypes") - private okhttp3.Call batchUpdateItemsByTextValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call batchUpdateItemsByTextValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, 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 batchUpdateItemsByText(Async)"); @@ -171,30 +171,24 @@ private okhttp3.Call batchUpdateItemsByTextValidateBeforeCall(String appId, Stri throw new ApiException("Missing the required parameter 'namespaceName' when calling batchUpdateItemsByText(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling batchUpdateItemsByText(Async)"); - } - // verify the required parameter 'openNamespaceTextModel' is set if (openNamespaceTextModel == null) { throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling batchUpdateItemsByText(Async)"); } - return batchUpdateItemsByTextCall(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel, _callback); + return batchUpdateItemsByTextCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator, _callback); } /** * 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) * @param openNamespaceTextModel (required) - * @return Object + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -203,21 +197,20 @@ private okhttp3.Call batchUpdateItemsByTextValidateBeforeCall(String appId, Stri
403 权限不足 -
*/ - public Object batchUpdateItemsByText(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { - ApiResponse localVarResp = batchUpdateItemsByTextWithHttpInfo(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); - return localVarResp.getData(); + public void batchUpdateItemsByText(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator) throws ApiException { + batchUpdateItemsByTextWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); } /** * 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) * @param openNamespaceTextModel (required) - * @return ApiResponse<Object> + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -226,21 +219,20 @@ public Object batchUpdateItemsByText(String appId, String env, String clusterNam
403 权限不足 -
*/ - public ApiResponse batchUpdateItemsByTextWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse batchUpdateItemsByTextWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator) throws ApiException { + okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator, null); + return localVarApiClient.execute(localVarCall); } /** * 通过文本批量修改配置项 (new added) (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) * @param openNamespaceTextModel (required) + * @param operator 操作人用户名 (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 @@ -251,11 +243,10 @@ public ApiResponse batchUpdateItemsByTextWithHttpInfo(String appId, Stri 403 权限不足 - */ - public okhttp3.Call batchUpdateItemsByTextAsync(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call batchUpdateItemsByTextAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** @@ -264,7 +255,7 @@ public okhttp3.Call batchUpdateItemsByTextAsync(String appId, String env, String * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -274,7 +265,7 @@ public okhttp3.Call batchUpdateItemsByTextAsync(String appId, String env, String 200 成功对比命名空间配置差异 - */ - public okhttp3.Call compareItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call compareItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -288,10 +279,10 @@ public okhttp3.Call compareItemsCall(String appId, String env, String clusterNam basePath = null; } - Object localVarPostBody = openNamespaceSyncModel; + Object localVarPostBody = openNamespaceSyncDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -324,7 +315,7 @@ public okhttp3.Call compareItemsCall(String appId, String env, String clusterNam } @SuppressWarnings("rawtypes") - private okhttp3.Call compareItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call compareItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, 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 compareItems(Async)"); @@ -345,24 +336,24 @@ private okhttp3.Call compareItemsValidateBeforeCall(String appId, String env, St throw new ApiException("Missing the required parameter 'namespaceName' when calling compareItems(Async)"); } - // verify the required parameter 'openNamespaceSyncModel' is set - if (openNamespaceSyncModel == null) { - throw new ApiException("Missing the required parameter 'openNamespaceSyncModel' when calling compareItems(Async)"); + // verify the required parameter 'openNamespaceSyncDTO' is set + if (openNamespaceSyncDTO == null) { + throw new ApiException("Missing the required parameter 'openNamespaceSyncDTO' when calling compareItems(Async)"); } - return compareItemsCall(appId, env, clusterName, namespaceName, openNamespaceSyncModel, _callback); + return compareItemsCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, _callback); } /** * 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncModel (required) - * @return List<OpenItemDiffs> + * @param openNamespaceSyncDTO (required) + * @return List<OpenItemDiffDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -370,20 +361,20 @@ private okhttp3.Call compareItemsValidateBeforeCall(String appId, String env, St
200 成功对比命名空间配置差异 -
*/ - public List compareItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { - ApiResponse> localVarResp = compareItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceSyncModel); + public List compareItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO) throws ApiException { + ApiResponse> localVarResp = compareItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); return localVarResp.getData(); } /** * 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncModel (required) - * @return ApiResponse<List<OpenItemDiffs>> + * @param openNamespaceSyncDTO (required) + * @return ApiResponse<List<OpenItemDiffDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -391,20 +382,20 @@ public List compareItems(String appId, String env, String cluster
200 成功对比命名空间配置差异 -
*/ - public ApiResponse> compareItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { - okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncModel, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> compareItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO) throws ApiException { + okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 对比命名空间配置差异 (new added) (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (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 @@ -414,10 +405,10 @@ public ApiResponse> compareItemsWithHttpInfo(String appId, S 200 成功对比命名空间配置差异 - */ - public okhttp3.Call compareItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call compareItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncModel, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -427,8 +418,8 @@ public okhttp3.Call compareItemsAsync(String appId, String env, String clusterNa * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -440,7 +431,7 @@ public okhttp3.Call compareItemsAsync(String appId, String env, String clusterNa 403 权限不足 - */ - public okhttp3.Call createItemCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createItemCall(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -494,7 +485,7 @@ public okhttp3.Call createItemCall(String appId, String env, String clusterName, } @SuppressWarnings("rawtypes") - private okhttp3.Call createItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, 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 createItem(Async)"); @@ -515,17 +506,12 @@ private okhttp3.Call createItemValidateBeforeCall(String appId, String env, Stri throw new ApiException("Missing the required parameter 'namespaceName' when calling createItem(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling createItem(Async)"); - } - // verify the required parameter 'openItemDTO' is set if (openItemDTO == null) { throw new ApiException("Missing the required parameter 'openItemDTO' when calling createItem(Async)"); } - return createItemCall(appId, env, clusterName, namespaceName, operator, openItemDTO, _callback); + return createItemCall(appId, env, clusterName, namespaceName, openItemDTO, operator, _callback); } @@ -536,8 +522,8 @@ private okhttp3.Call createItemValidateBeforeCall(String appId, String env, Stri * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return OpenItemDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -548,8 +534,8 @@ private okhttp3.Call createItemValidateBeforeCall(String appId, String env, Stri 403 权限不足 - */ - public OpenItemDTO createItem(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = createItemWithHttpInfo(appId, env, clusterName, namespaceName, operator, openItemDTO); + public OpenItemDTO createItem(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator) throws ApiException { + ApiResponse localVarResp = createItemWithHttpInfo(appId, env, clusterName, namespaceName, openItemDTO, operator); return localVarResp.getData(); } @@ -560,8 +546,8 @@ public OpenItemDTO createItem(String appId, String env, String clusterName, Stri * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return ApiResponse<OpenItemDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -572,8 +558,8 @@ public OpenItemDTO createItem(String appId, String env, String clusterName, Stri 403 权限不足 - */ - public ApiResponse createItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openItemDTO, null); + public ApiResponse createItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, operator, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -585,8 +571,8 @@ public ApiResponse createItemWithHttpInfo(String appId, String env, * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (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 @@ -598,9 +584,9 @@ public ApiResponse createItemWithHttpInfo(String appId, String env, 403 权限不足 - */ - public okhttp3.Call createItemAsync(String appId, String env, String clusterName, String namespaceName, String operator, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createItemAsync(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openItemDTO, _callback); + okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, operator, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -612,7 +598,7 @@ public okhttp3.Call createItemAsync(String appId, String env, String clusterName * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param key 配置项键名 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -657,7 +643,6 @@ public okhttp3.Call deleteItemCall(String appId, String env, String clusterName, } final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -702,11 +687,6 @@ private okhttp3.Call deleteItemValidateBeforeCall(String appId, String env, Stri throw new ApiException("Missing the required parameter 'key' when calling deleteItem(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling deleteItem(Async)"); - } - return deleteItemCall(appId, env, clusterName, namespaceName, key, operator, _callback); } @@ -719,8 +699,7 @@ private okhttp3.Call deleteItemValidateBeforeCall(String appId, String env, Stri * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param key 配置项键名 (required) - * @param operator 操作人用户名 (required) - * @return Object + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -728,9 +707,8 @@ private okhttp3.Call deleteItemValidateBeforeCall(String appId, String env, Stri
200 配置项删除成功 -
*/ - public Object deleteItem(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { - ApiResponse localVarResp = deleteItemWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); - return localVarResp.getData(); + public void deleteItem(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + deleteItemWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); } /** @@ -741,8 +719,8 @@ public Object deleteItem(String appId, String env, String clusterName, String na * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param key 配置项键名 (required) - * @param operator 操作人用户名 (required) - * @return ApiResponse<Object> + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -750,10 +728,9 @@ public Object deleteItem(String appId, String env, String clusterName, String na
200 配置项删除成功 -
*/ - public ApiResponse deleteItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + public ApiResponse deleteItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { okhttp3.Call localVarCall = deleteItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** @@ -764,7 +741,7 @@ public ApiResponse deleteItemWithHttpInfo(String appId, String env, Stri * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param key 配置项键名 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (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 @@ -774,11 +751,10 @@ public ApiResponse deleteItemWithHttpInfo(String appId, String env, Stri 200 配置项删除成功 - */ - public okhttp3.Call deleteItemAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteItemAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** @@ -833,7 +809,6 @@ public okhttp3.Call deleteItemByEncodedKeyCall(String appId, String env, String } final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -896,7 +871,6 @@ private okhttp3.Call deleteItemByEncodedKeyValidateBeforeCall(String appId, Stri * @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 @@ -904,9 +878,8 @@ private okhttp3.Call deleteItemByEncodedKeyValidateBeforeCall(String appId, Stri
200 -
*/ - public Object deleteItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { - ApiResponse localVarResp = deleteItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); - return localVarResp.getData(); + public void deleteItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + deleteItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); } /** @@ -918,7 +891,7 @@ public Object deleteItemByEncodedKey(String appId, String env, String clusterNam * @param namespaceName (required) * @param key (required) * @param operator (required) - * @return ApiResponse<Object> + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -926,10 +899,9 @@ public Object deleteItemByEncodedKey(String appId, String env, String clusterNam
200 -
*/ - public ApiResponse deleteItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { + public ApiResponse deleteItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { okhttp3.Call localVarCall = deleteItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** @@ -950,32 +922,30 @@ public ApiResponse deleteItemByEncodedKeyWithHttpInfo(String appId, Stri 200 - */ - public okhttp3.Call deleteItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for findItemsByNamespace + * Build call for findBranchItems * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (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 - - + +
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public okhttp3.Call findItemsByNamespaceCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findBranchItemsCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -992,11 +962,12 @@ public okhttp3.Call findItemsByNamespaceCall(String appId, String env, String cl Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" + 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("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1004,14 +975,6 @@ public okhttp3.Call findItemsByNamespaceCall(String appId, String env, String cl 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" }; @@ -1032,132 +995,125 @@ public okhttp3.Call findItemsByNamespaceCall(String appId, String env, String cl } @SuppressWarnings("rawtypes") - private okhttp3.Call findItemsByNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findBranchItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, 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 findItemsByNamespace(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findBranchItems(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findItemsByNamespace(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findBranchItems(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findItemsByNamespace(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findBranchItems(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findItemsByNamespace(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling findItemsByNamespace(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling findBranchItems(Async)"); } - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling findItemsByNamespace(Async)"); + // verify the required parameter 'branchName' is set + if (branchName == null) { + throw new ApiException("Missing the required parameter 'branchName' when calling findBranchItems(Async)"); } - return findItemsByNamespaceCall(appId, env, clusterName, namespaceName, page, size, _callback); + return findBranchItemsCall(appId, env, clusterName, namespaceName, branchName, _callback); } /** - * 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 + * 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return OpenItemPageDTO + * @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 - - + +
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public OpenItemPageDTO findItemsByNamespace(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { - ApiResponse localVarResp = findItemsByNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, page, size); + public List findBranchItems(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { + ApiResponse> localVarResp = findBranchItemsWithHttpInfo(appId, env, clusterName, namespaceName, branchName); return localVarResp.getData(); } /** - * 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 + * 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return ApiResponse<OpenItemPageDTO> + * @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 - - + +
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public ApiResponse findItemsByNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findBranchItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { + okhttp3.Call localVarCall = findBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取命名空间下的配置项列表 (original openapi) (asynchronously) - * 获取指定命名空间的配置项列表,支持分页 + * 获取分支下的配置项 (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (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 - - + +
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
200 成功获取分支下的配置项列表 -
404 分支不存在 -
*/ - public okhttp3.Call findItemsByNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findBranchItemsAsync(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getBranchItems + * Build call for findItemsByNamespace * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - + +
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public okhttp3.Call getBranchItemsCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findItemsByNamespaceCall(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1174,12 +1130,11 @@ public okhttp3.Call getBranchItemsCall(String appId, String env, String clusterN Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items" + 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())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1187,6 +1142,14 @@ public okhttp3.Call getBranchItemsCall(String appId, String env, String clusterN 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" }; @@ -1207,103 +1170,111 @@ public okhttp3.Call getBranchItemsCall(String appId, String env, String clusterN } @SuppressWarnings("rawtypes") - private okhttp3.Call getBranchItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findItemsByNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Integer page, 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 getBranchItems(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getBranchItems(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getBranchItems(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findItemsByNamespace(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getBranchItems(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling findItemsByNamespace(Async)"); } - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling getBranchItems(Async)"); + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling findItemsByNamespace(Async)"); + } + + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling findItemsByNamespace(Async)"); } - return getBranchItemsCall(appId, env, clusterName, namespaceName, branchName, _callback); + return findItemsByNamespaceCall(appId, env, clusterName, namespaceName, page, size, _callback); } /** - * 获取分支下的配置项 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return List<OpenItemDTO> + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return OpenItemPageDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public List getBranchItems(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { - ApiResponse> localVarResp = getBranchItemsWithHttpInfo(appId, env, clusterName, namespaceName, branchName); + public OpenItemPageDTO findItemsByNamespace(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + ApiResponse localVarResp = findItemsByNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, page, size); return localVarResp.getData(); } /** - * 获取分支下的配置项 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return ApiResponse<List<OpenItemDTO>> + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return ApiResponse<OpenItemPageDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + +
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public ApiResponse> getBranchItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { - okhttp3.Call localVarCall = getBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse findItemsByNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取分支下的配置项 (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取命名空间下的配置项列表 (original openapi) (asynchronously) + * 获取指定命名空间的配置项列表,支持分页 * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - + +
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
200 成功获取配置项列表 -
404 命名空间不存在 -
*/ - public okhttp3.Call getBranchItemsAsync(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call findItemsByNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1647,7 +1618,7 @@ public okhttp3.Call getItemByEncodedKeyAsync(String appId, String env, String cl * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1676,7 +1647,7 @@ public okhttp3.Call revertItemsCall(String appId, String env, String clusterName Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1733,24 +1704,18 @@ private okhttp3.Call revertItemsValidateBeforeCall(String appId, String env, Str throw new ApiException("Missing the required parameter 'namespaceName' when calling revertItems(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling revertItems(Async)"); - } - return revertItemsCall(appId, env, clusterName, namespaceName, operator, _callback); } /** * 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @return Object + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1760,20 +1725,19 @@ private okhttp3.Call revertItemsValidateBeforeCall(String appId, String env, Str
403 权限不足 -
*/ - public Object revertItems(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - ApiResponse localVarResp = revertItemsWithHttpInfo(appId, env, clusterName, namespaceName, operator); - return localVarResp.getData(); + public void revertItems(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + revertItemsWithHttpInfo(appId, env, clusterName, namespaceName, operator); } /** * 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @return ApiResponse<Object> + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1783,20 +1747,19 @@ public Object revertItems(String appId, String env, String clusterName, String n
403 权限不足 -
*/ - public ApiResponse revertItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + public ApiResponse revertItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { okhttp3.Call localVarCall = revertItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** * 撤销配置项更改 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (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 @@ -1808,11 +1771,10 @@ public ApiResponse revertItemsWithHttpInfo(String appId, String env, Str 403 权限不足 - */ - public okhttp3.Call revertItemsAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call revertItemsAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = revertItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** @@ -1821,8 +1783,8 @@ public okhttp3.Call revertItemsAsync(String appId, String env, String clusterNam * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1834,7 +1796,7 @@ public okhttp3.Call revertItemsAsync(String appId, String env, String clusterNam 403 权限不足 - */ - public okhttp3.Call syncItemsCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call syncItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1848,10 +1810,10 @@ public okhttp3.Call syncItemsCall(String appId, String env, String clusterName, basePath = null; } - Object localVarPostBody = openNamespaceSyncModel; + Object localVarPostBody = openNamespaceSyncDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) @@ -1888,7 +1850,7 @@ public okhttp3.Call syncItemsCall(String appId, String env, String clusterName, } @SuppressWarnings("rawtypes") - private okhttp3.Call syncItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call syncItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, 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 syncItems(Async)"); @@ -1909,30 +1871,24 @@ private okhttp3.Call syncItemsValidateBeforeCall(String appId, String env, Strin throw new ApiException("Missing the required parameter 'namespaceName' when calling syncItems(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling syncItems(Async)"); - } - - // verify the required parameter 'openNamespaceSyncModel' is set - if (openNamespaceSyncModel == null) { - throw new ApiException("Missing the required parameter 'openNamespaceSyncModel' when calling syncItems(Async)"); + // verify the required parameter 'openNamespaceSyncDTO' is set + if (openNamespaceSyncDTO == null) { + throw new ApiException("Missing the required parameter 'openNamespaceSyncDTO' when calling syncItems(Async)"); } - return syncItemsCall(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel, _callback); + return syncItemsCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator, _callback); } /** * 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @param openNamespaceSyncModel (required) - * @return Object + * @param openNamespaceSyncDTO (required) + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1942,21 +1898,20 @@ private okhttp3.Call syncItemsValidateBeforeCall(String appId, String env, Strin
403 权限不足 -
*/ - public Object syncItems(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { - ApiResponse localVarResp = syncItemsWithHttpInfo(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); - return localVarResp.getData(); + public void syncItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator) throws ApiException { + syncItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); } /** * 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @param openNamespaceSyncModel (required) - * @return ApiResponse<Object> + * @param openNamespaceSyncDTO (required) + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1966,21 +1921,20 @@ public Object syncItems(String appId, String env, String clusterName, String nam
403 权限不足 -
*/ - public ApiResponse syncItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel) throws ApiException { - okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse syncItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator, null); + return localVarApiClient.execute(localVarCall); } /** * 同步配置项到多个命名空间 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) + * @param operator 操作人用户名 (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 @@ -1992,35 +1946,30 @@ public ApiResponse syncItemsWithHttpInfo(String appId, String env, Strin 403 权限不足 - */ - public okhttp3.Call syncItemsAsync(String appId, String env, String clusterName, String namespaceName, String operator, OpenNamespaceSyncModel openNamespaceSyncModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call syncItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for updateItem + * Build call for syntaxCheck * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) + * @param env (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param openNamespaceTextModel (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - - - - + +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public okhttp3.Call updateItemCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call syntaxCheckCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2034,15 +1983,14 @@ public okhttp3.Call updateItemCall(String appId, String env, String clusterName, basePath = null; } - Object localVarPostBody = openItemDTO; + Object localVarPostBody = openNamespaceTextModel; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" .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())); + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2050,10 +1998,6 @@ public okhttp3.Call updateItemCall(String appId, String env, String clusterName, Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (createIfNotExists != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); - } - final String[] localVarAccepts = { "application/json" }; @@ -2071,154 +2015,129 @@ public okhttp3.Call updateItemCall(String appId, String env, String clusterName, } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call syntaxCheckValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, 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 updateItem(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling syntaxCheck(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling updateItem(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling syntaxCheck(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling updateItem(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling syntaxCheck(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItem(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling updateItem(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling syntaxCheck(Async)"); } - // verify the required parameter 'createIfNotExists' is set - if (createIfNotExists == null) { - throw new ApiException("Missing the required parameter 'createIfNotExists' when calling updateItem(Async)"); - } - - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling updateItem(Async)"); + // verify the required parameter 'openNamespaceTextModel' is set + if (openNamespaceTextModel == null) { + throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling syntaxCheck(Async)"); } - return updateItemCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + return syntaxCheckCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); } /** - * 更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return Object + * @param env (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param openNamespaceTextModel (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - - + +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public Object updateItem(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = updateItemWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - return localVarResp.getData(); + public void syntaxCheck(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { + syntaxCheckWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceTextModel); } /** - * 更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @return ApiResponse<Object> + * @param env (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param openNamespaceTextModel (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - - + +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public ApiResponse updateItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse syntaxCheckWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { + okhttp3.Call localVarCall = syntaxCheckValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, null); + return localVarApiClient.execute(localVarCall); } /** - * 更新配置项 (original openapi) (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 验证配置文本语法 (new added) (asynchronously) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) + * @param env (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param openNamespaceTextModel (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - - - - + +
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
200 配置文本语法验证通过 -
400 配置文本语法错误 -
*/ - public okhttp3.Call updateItemAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call syntaxCheckAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = syntaxCheckValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for updateItemByEncodedKey - * @param appId 应用ID (required) + * Build call for updateItem + * @param appId (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名(需要URL编码) (required) - * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param key (required) + * @param createIfNotExists (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (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 - +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateItemCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2235,7 +2154,7 @@ public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String Object localVarPostBody = openItemDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" + 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())) @@ -2252,6 +2171,10 @@ public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); } + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2273,146 +2196,150 @@ public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String } @SuppressWarnings("rawtypes") - private okhttp3.Call updateItemByEncodedKeyValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, 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 updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling updateItem(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling updateItem(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling updateItem(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItem(Async)"); } // verify the required parameter 'key' is set if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'key' when calling updateItem(Async)"); } // verify the required parameter 'createIfNotExists' is set if (createIfNotExists == null) { - throw new ApiException("Missing the required parameter 'createIfNotExists' when calling updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'createIfNotExists' when calling updateItem(Async)"); } // verify the required parameter 'openItemDTO' is set if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling updateItemByEncodedKey(Async)"); + throw new ApiException("Missing the required parameter 'openItemDTO' when calling updateItem(Async)"); } - return updateItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); + return updateItemCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, _callback); } /** - * 通过编码的key更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId 应用ID (required) + * 更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名(需要URL编码) (required) - * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param key (required) + * @param createIfNotExists (required) * @param openItemDTO (required) - * @return Object + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public Object updateItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { - ApiResponse localVarResp = updateItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - return localVarResp.getData(); + public void updateItem(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { + updateItemWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); } /** - * 通过编码的key更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId 应用ID (required) + * 更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名(需要URL编码) (required) - * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param key (required) + * @param createIfNotExists (required) * @param openItemDTO (required) - * @return ApiResponse<Object> + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public ApiResponse updateItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO) throws ApiException { - okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse updateItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, null); + return localVarApiClient.execute(localVarCall); } /** - * 通过编码的key更新配置项 (original openapi) (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId 应用ID (required) + * 更新配置项 (original openapi) (asynchronously) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * @param appId (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名(需要URL编码) (required) - * @param createIfNotExists 若不存在则创建(true/false) (required) + * @param key (required) + * @param createIfNotExists (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (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 - +
Status Code Description Response Headers
200 配置项更新成功(编码key) -
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call updateItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateItemAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for validateItems - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) + * Build call for updateItemByEncodedKey + * @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) + * @param operator 操作人用户名 (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 - - + + + +
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call validateItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2426,14 +2353,15 @@ public okhttp3.Call validateItemsCall(String appId, String env, String clusterNa basePath = null; } - Object localVarPostBody = openNamespaceTextModel; + Object localVarPostBody = openItemDTO; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" + 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("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) + .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2441,6 +2369,14 @@ public okhttp3.Call validateItemsCall(String appId, String env, String clusterNa Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (createIfNotExists != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); + } + + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -2458,108 +2394,129 @@ public okhttp3.Call validateItemsCall(String appId, String env, String clusterNa } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call validateItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateItemByEncodedKeyValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, 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 validateItems(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling updateItemByEncodedKey(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling validateItems(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling updateItemByEncodedKey(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling validateItems(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling updateItemByEncodedKey(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling validateItems(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItemByEncodedKey(Async)"); } - // verify the required parameter 'openNamespaceTextModel' is set - if (openNamespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling validateItems(Async)"); + // verify the required parameter 'key' is set + if (key == null) { + throw new ApiException("Missing the required parameter 'key' when calling updateItemByEncodedKey(Async)"); } - return validateItemsCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); + // verify the required parameter 'createIfNotExists' is set + if (createIfNotExists == null) { + throw new ApiException("Missing the required parameter 'createIfNotExists' when calling updateItemByEncodedKey(Async)"); + } + + // verify the required parameter 'openItemDTO' is set + if (openItemDTO == null) { + throw new ApiException("Missing the required parameter 'openItemDTO' when calling updateItemByEncodedKey(Async)"); + } + + return updateItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, _callback); } /** - * 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return Object + * 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * @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) + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + + + +
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public Object validateItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { - ApiResponse localVarResp = validateItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceTextModel); - return localVarResp.getData(); + public void updateItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { + updateItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); } /** - * 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return ApiResponse<Object> + * 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * @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) + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - + + + +
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public ApiResponse validateItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = validateItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse updateItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, null); + return localVarApiClient.execute(localVarCall); } /** - * 验证配置文本语法 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) + * 通过编码的key更新配置项 (original openapi) (asynchronously) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * @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) + * @param operator 操作人用户名 (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 - - + + + +
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
*/ - public okhttp3.Call validateItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = validateItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _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 index c138b2f..404625c 100644 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java @@ -83,7 +83,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -167,11 +167,6 @@ private okhttp3.Call createBranchValidateBeforeCall(String appId, String env, St throw new ApiException("Missing the required parameter 'namespaceName' when calling createBranch(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling createBranch(Async)"); - } - return createBranchCall(appId, env, clusterName, namespaceName, operator, _callback); } @@ -183,7 +178,7 @@ private okhttp3.Call createBranchValidateBeforeCall(String appId, String env, St * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -204,7 +199,7 @@ public OpenNamespaceDTO createBranch(String appId, String env, String clusterNam * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -226,7 +221,7 @@ public ApiResponse createBranchWithHttpInfo(String appId, Stri * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (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 @@ -295,7 +290,6 @@ public okhttp3.Call deleteBranchCall(String env, String appId, String clusterNam } final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -358,7 +352,6 @@ private okhttp3.Call deleteBranchValidateBeforeCall(String env, String appId, St * @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 @@ -366,9 +359,8 @@ private okhttp3.Call deleteBranchValidateBeforeCall(String env, String appId, St
200 分支删除成功 -
*/ - public Object deleteBranch(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { - ApiResponse localVarResp = deleteBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, operator); - return localVarResp.getData(); + public void deleteBranch(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { + deleteBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, operator); } /** @@ -380,7 +372,7 @@ public Object deleteBranch(String env, String appId, String clusterName, String * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param operator 操作人用户名 (required) - * @return ApiResponse<Object> + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -388,10 +380,9 @@ public Object deleteBranch(String env, String appId, String clusterName, String
200 分支删除成功 -
*/ - public ApiResponse deleteBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { + public ApiResponse deleteBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** @@ -412,11 +403,10 @@ public ApiResponse deleteBranchWithHttpInfo(String env, String appId, St 200 分支删除成功 - */ - public okhttp3.Call deleteBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, String operator, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** @@ -425,6 +415,7 @@ public okhttp3.Call deleteBranchAsync(String env, String appId, String clusterNa * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -435,7 +426,7 @@ public okhttp3.Call deleteBranchAsync(String env, String appId, String clusterNa 404 分支不存在 - */ - public okhttp3.Call findBranchCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findBranchCall(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -464,6 +455,10 @@ public okhttp3.Call findBranchCall(String appId, String env, String clusterName, Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (extendInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); + } + final String[] localVarAccepts = { "application/json" }; @@ -484,7 +479,7 @@ public okhttp3.Call findBranchCall(String appId, String env, String clusterName, } @SuppressWarnings("rawtypes") - private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo, 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 findBranch(Async)"); @@ -505,7 +500,7 @@ private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, Stri throw new ApiException("Missing the required parameter 'namespaceName' when calling findBranch(Async)"); } - return findBranchCall(appId, env, clusterName, namespaceName, _callback); + return findBranchCall(appId, env, clusterName, namespaceName, extendInfo, _callback); } @@ -516,6 +511,7 @@ private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, Stri * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -525,8 +521,8 @@ private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, Stri 404 分支不存在 - */ - public OpenNamespaceDTO findBranch(String appId, String env, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = findBranchWithHttpInfo(appId, env, clusterName, namespaceName); + public OpenNamespaceDTO findBranch(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { + ApiResponse localVarResp = findBranchWithHttpInfo(appId, env, clusterName, namespaceName, extendInfo); return localVarResp.getData(); } @@ -537,6 +533,7 @@ public OpenNamespaceDTO findBranch(String appId, String env, String clusterName, * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -546,8 +543,8 @@ public OpenNamespaceDTO findBranch(String appId, String env, String clusterName, 404 分支不存在 - */ - public ApiResponse findBranchWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, null); + public ApiResponse findBranchWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { + okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, extendInfo, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -559,6 +556,7 @@ public ApiResponse findBranchWithHttpInfo(String appId, String * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) * @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 @@ -569,9 +567,9 @@ public ApiResponse findBranchWithHttpInfo(String appId, String 404 分支不存在 - */ - public okhttp3.Call findBranchAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findBranchAsync(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, extendInfo, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -739,6 +737,200 @@ public okhttp3.Call getBranchGrayRulesAsync(String appId, String env, String clu localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for merge + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (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 + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call mergeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, 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 mergeValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, 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 merge(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling merge(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling merge(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling merge(Async)"); + } + + // verify the required parameter 'branchName' is set + if (branchName == null) { + throw new ApiException("Missing the required parameter 'branchName' when calling merge(Async)"); + } + + // verify the required parameter 'deleteBranch' is set + if (deleteBranch == null) { + throw new ApiException("Missing the required parameter 'deleteBranch' when calling merge(Async)"); + } + + // verify the required parameter 'namespaceReleaseDTO' is set + if (namespaceReleaseDTO == null) { + throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling merge(Async)"); + } + + return mergeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); + + } + + /** + * 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * @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 OpenReleaseDTO + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public OpenReleaseDTO merge(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + ApiResponse localVarResp = mergeWithHttpInfo(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + return localVarResp.getData(); + } + + /** + * 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * @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 ApiResponse<OpenReleaseDTO> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public ApiResponse mergeWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { + okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 合并分支 (original openapi) (asynchronously) + * 合并灰度分支并可选择删除分支 + * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param branchName 分支名称 (required) + * @param deleteBranch 合并后是否删除分支(true/false) (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 + + + + + +
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
+ */ + public okhttp3.Call mergeAsync(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for mergeBranch * @param env 环境标识 (required) @@ -747,8 +939,8 @@ public okhttp3.Call getBranchGrayRulesAsync(String appId, String env, String clu * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -758,7 +950,7 @@ public okhttp3.Call getBranchGrayRulesAsync(String appId, String env, String clu 200 分支合并成功 - */ - public okhttp3.Call mergeBranchCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call mergeBranchCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -813,11 +1005,11 @@ public okhttp3.Call mergeBranchCall(String env, String appId, String clusterName } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call mergeBranchValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call mergeBranchValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, 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 mergeBranch(Async)"); @@ -848,31 +1040,26 @@ private okhttp3.Call mergeBranchValidateBeforeCall(String env, String appId, Str throw new ApiException("Missing the required parameter 'deleteBranch' when calling mergeBranch(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling mergeBranch(Async)"); - } - // verify the required parameter 'namespaceReleaseDTO' is set if (namespaceReleaseDTO == null) { throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling mergeBranch(Async)"); } - return mergeBranchCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO, _callback); + return mergeBranchCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator, _callback); } /** * 合并分支到主分支 (new added) - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) + * @param operator 操作人用户名 (optional) * @return OpenReleaseDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -881,22 +1068,22 @@ private okhttp3.Call mergeBranchValidateBeforeCall(String env, String appId, Str 200 分支合并成功 - */ - public OpenReleaseDTO mergeBranch(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = mergeBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); + public OpenReleaseDTO mergeBranch(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { + ApiResponse localVarResp = mergeBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); return localVarResp.getData(); } /** * 合并分支到主分支 (new added) - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) + * @param operator 操作人用户名 (optional) * @return ApiResponse<OpenReleaseDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -905,23 +1092,23 @@ public OpenReleaseDTO mergeBranch(String env, String appId, String clusterName, 200 分支合并成功 - */ - public ApiResponse mergeBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO, null); + public ApiResponse mergeBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 合并分支到主分支 (new added) (asynchronously) - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) + * @param operator 操作人用户名 (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 @@ -931,9 +1118,9 @@ public ApiResponse mergeBranchWithHttpInfo(String env, String ap 200 分支合并成功 - */ - public okhttp3.Call mergeBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, String operator, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call mergeBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO, _callback); + okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -991,7 +1178,6 @@ public okhttp3.Call updateBranchRulesCall(String appId, String env, String clust } final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -1061,7 +1247,6 @@ private okhttp3.Call updateBranchRulesValidateBeforeCall(String appId, String en * @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 @@ -1069,9 +1254,8 @@ private okhttp3.Call updateBranchRulesValidateBeforeCall(String appId, String en
200 灰度规则更新成功 -
*/ - public Object updateBranchRules(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { - ApiResponse localVarResp = updateBranchRulesWithHttpInfo(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); - return localVarResp.getData(); + public void updateBranchRules(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { + updateBranchRulesWithHttpInfo(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); } /** @@ -1084,7 +1268,7 @@ public Object updateBranchRules(String appId, String env, String clusterName, St * @param branchName 分支名称 (required) * @param operator 操作人用户名 (required) * @param openGrayReleaseRuleDTO (required) - * @return ApiResponse<Object> + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1092,10 +1276,9 @@ public Object updateBranchRules(String appId, String env, String clusterName, St
200 灰度规则更新成功 -
*/ - public ApiResponse updateBranchRulesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { + public ApiResponse updateBranchRulesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO) throws ApiException { okhttp3.Call localVarCall = updateBranchRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + return localVarApiClient.execute(localVarCall); } /** @@ -1117,11 +1300,10 @@ public ApiResponse updateBranchRulesWithHttpInfo(String appId, String en 200 灰度规则更新成功 - */ - public okhttp3.Call updateBranchRulesAsync(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateBranchRulesAsync(String appId, String env, String clusterName, String namespaceName, String branchName, String operator, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateBranchRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } } diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java new file mode 100644 index 0000000..0a39b26 --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java @@ -0,0 +1,229 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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.OpenNamespaceLockDTO; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.ws.rs.core.GenericType; + +public class NamespaceLockManagementApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public NamespaceLockManagementApi() { + this(Configuration.getDefaultApiClient()); + } + + public NamespaceLockManagementApi(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 getNamespaceLock + * @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 + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call getNamespaceLockCall(String appId, String env, String clusterName, 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 getNamespaceLockValidateBeforeCall(String appId, String env, String clusterName, 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 getNamespaceLock(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling getNamespaceLock(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling getNamespaceLock(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling getNamespaceLock(Async)"); + } + + return getNamespaceLockCall(appId, env, clusterName, namespaceName, _callback); + + } + + /** + * 获取Namespace的锁状态 (original openapi) + * 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 + + + +
Status Code Description Response Headers
200 -
+ */ + public OpenNamespaceLockDTO getNamespaceLock(String appId, String env, String clusterName, String namespaceName) throws ApiException { + ApiResponse localVarResp = getNamespaceLockWithHttpInfo(appId, env, clusterName, namespaceName); + return localVarResp.getData(); + } + + /** + * 获取Namespace的锁状态 (original openapi) + * 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 + + + +
Status Code Description Response Headers
200 -
+ */ + public ApiResponse getNamespaceLockWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 获取Namespace的锁状态 (original openapi) (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 + + + +
Status Code Description Response Headers
200 -
+ */ + public okhttp3.Call getNamespaceLockAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(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/NamespaceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java index 0f78551..c5b1db4 100644 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java @@ -27,10 +27,9 @@ import java.io.IOException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenAppNamespaceDTO; +import org.openapitools.client.model.OpenCreateNamespaceDTO; import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceLockDTO; +import org.openapitools.client.model.OpenNamespaceUsageDTO; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,20 +76,21 @@ public void setCustomBaseUrl(String customBaseUrl) { } /** - * Build call for checkNamespaceIntegrity + * Build call for createMissingNamespaces * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) + * @param operator 操作人用户名 (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 - +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
200 缺失的命名空间创建成功 -
*/ - public okhttp3.Call checkNamespaceIntegrityCall(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMissingNamespacesCall(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -107,7 +107,7 @@ public okhttp3.Call checkNamespaceIntegrityCall(String appId, String env, String Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); @@ -118,6 +118,10 @@ public okhttp3.Call checkNamespaceIntegrityCall(String appId, String env, String Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (operator != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); + } + final String[] localVarAccepts = { "application/json" }; @@ -134,107 +138,108 @@ public okhttp3.Call checkNamespaceIntegrityCall(String appId, String env, String } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call checkNamespaceIntegrityValidateBeforeCall(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMissingNamespacesValidateBeforeCall(String appId, String env, String clusterName, 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 checkNamespaceIntegrity(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling createMissingNamespaces(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling checkNamespaceIntegrity(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling createMissingNamespaces(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling checkNamespaceIntegrity(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling createMissingNamespaces(Async)"); } - return checkNamespaceIntegrityCall(appId, env, clusterName, _callback); + return createMissingNamespacesCall(appId, env, clusterName, operator, _callback); } /** - * 检查缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 创建缺失的Namespace (new added) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @return List<String> + * @param operator 操作人用户名 (optional) + * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
200 缺失的命名空间创建成功 -
*/ - public List checkNamespaceIntegrity(String appId, String env, String clusterName) throws ApiException { - ApiResponse> localVarResp = checkNamespaceIntegrityWithHttpInfo(appId, env, clusterName); + public Object createMissingNamespaces(String appId, String env, String clusterName, String operator) throws ApiException { + ApiResponse localVarResp = createMissingNamespacesWithHttpInfo(appId, env, clusterName, operator); return localVarResp.getData(); } /** - * 检查缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 创建缺失的Namespace (new added) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @return ApiResponse<List<String>> + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
200 缺失的命名空间创建成功 -
*/ - public ApiResponse> checkNamespaceIntegrityWithHttpInfo(String appId, String env, String clusterName) throws ApiException { - okhttp3.Call localVarCall = checkNamespaceIntegrityValidateBeforeCall(appId, env, clusterName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse createMissingNamespacesWithHttpInfo(String appId, String env, String clusterName, String operator) throws ApiException { + okhttp3.Call localVarCall = createMissingNamespacesValidateBeforeCall(appId, env, clusterName, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 检查缺失的Namespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * 创建缺失的Namespace (new added) (asynchronously) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) + * @param operator 操作人用户名 (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 - +
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
200 缺失的命名空间创建成功 -
*/ - public okhttp3.Call checkNamespaceIntegrityAsync(String appId, String env, String clusterName, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call createMissingNamespacesAsync(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = checkNamespaceIntegrityValidateBeforeCall(appId, env, clusterName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = createMissingNamespacesValidateBeforeCall(appId, env, clusterName, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for createNamespace - * @param appId (required) - * @param openAppNamespaceDTO (required) + * Build call for createNamespaces + * @param openCreateNamespaceDTO (required) + * @param operator 操作人用户名 (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 - - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 Namespace创建成功 -
*/ - public okhttp3.Call createNamespaceCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createNamespacesCall(List openCreateNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -248,11 +253,10 @@ public okhttp3.Call createNamespaceCall(String appId, OpenAppNamespaceDTO openAp basePath = null; } - Object localVarPostBody = openAppNamespaceDTO; + Object localVarPostBody = openCreateNamespaceDTO; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/namespaces"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -260,8 +264,11 @@ public okhttp3.Call createNamespaceCall(String appId, OpenAppNamespaceDTO openAp 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) { @@ -281,100 +288,87 @@ public okhttp3.Call createNamespaceCall(String appId, OpenAppNamespaceDTO openAp } @SuppressWarnings("rawtypes") - private okhttp3.Call createNamespaceValidateBeforeCall(String appId, 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 createNamespace(Async)"); - } - - // verify the required parameter 'openAppNamespaceDTO' is set - if (openAppNamespaceDTO == null) { - throw new ApiException("Missing the required parameter 'openAppNamespaceDTO' when calling createNamespace(Async)"); + private okhttp3.Call createNamespacesValidateBeforeCall(List openCreateNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'openCreateNamespaceDTO' is set + if (openCreateNamespaceDTO == null) { + throw new ApiException("Missing the required parameter 'openCreateNamespaceDTO' when calling createNamespaces(Async)"); } - return createNamespaceCall(appId, openAppNamespaceDTO, _callback); + return createNamespacesCall(openCreateNamespaceDTO, operator, _callback); } /** - * 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return OpenAppNamespaceDTO + * 创建Namespace (new added) + * POST /openapi/v1/apps/{appId}/namespaces + * @param openCreateNamespaceDTO (required) + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 Namespace创建成功 -
*/ - public OpenAppNamespaceDTO createNamespace(String appId, OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { - ApiResponse localVarResp = createNamespaceWithHttpInfo(appId, openAppNamespaceDTO); - return localVarResp.getData(); + public void createNamespaces(List openCreateNamespaceDTO, String operator) throws ApiException { + createNamespacesWithHttpInfo(openCreateNamespaceDTO, operator); } /** - * 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return ApiResponse<OpenAppNamespaceDTO> + * 创建Namespace (new added) + * POST /openapi/v1/apps/{appId}/namespaces + * @param openCreateNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 Namespace创建成功 -
*/ - public ApiResponse createNamespaceWithHttpInfo(String appId, OpenAppNamespaceDTO openAppNamespaceDTO) throws ApiException { - okhttp3.Call localVarCall = createNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse createNamespacesWithHttpInfo(List openCreateNamespaceDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = createNamespacesValidateBeforeCall(openCreateNamespaceDTO, operator, null); + return localVarApiClient.execute(localVarCall); } /** - * 创建AppNamespace (original openapi) (asynchronously) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) + * 创建Namespace (new added) (asynchronously) + * POST /openapi/v1/apps/{appId}/namespaces + * @param openCreateNamespaceDTO (required) + * @param operator 操作人用户名 (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 - - - +
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
200 Namespace创建成功 -
*/ - public okhttp3.Call createNamespaceAsync(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createNamespacesAsync(List openCreateNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = createNamespacesValidateBeforeCall(openCreateNamespaceDTO, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for deleteAppNamespace + * Build call for deleteNamespace * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (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 - +
Status Code Description Response Headers
200 AppNamespace删除成功 -
200 解除关联成功 -
*/ - public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteNamespaceCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -391,8 +385,10 @@ public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, S Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/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(); @@ -406,7 +402,6 @@ public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, S } final String[] localVarAccepts = { - "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -425,104 +420,109 @@ public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, S } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAppNamespaceValidateBeforeCall(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, 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 deleteAppNamespace(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling deleteNamespace(Async)"); } - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteAppNamespace(Async)"); + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling deleteNamespace(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling deleteNamespace(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling deleteAppNamespace(Async)"); + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteNamespace(Async)"); } - return deleteAppNamespaceCall(appId, namespaceName, operator, _callback); + return deleteNamespaceCall(appId, env, clusterName, namespaceName, operator, _callback); } /** - * 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除指定的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return Object + * @param operator 操作人用户名 (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 AppNamespace删除成功 -
200 解除关联成功 -
*/ - public Object deleteAppNamespace(String appId, String namespaceName, String operator) throws ApiException { - ApiResponse localVarResp = deleteAppNamespaceWithHttpInfo(appId, namespaceName, operator); - return localVarResp.getData(); + public void deleteNamespace(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + deleteNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, operator); } /** - * 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除指定的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return ApiResponse<Object> + * @param operator 操作人用户名 (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 AppNamespace删除成功 -
200 解除关联成功 -
*/ - public ApiResponse deleteAppNamespaceWithHttpInfo(String appId, String namespaceName, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + public ApiResponse deleteNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { + okhttp3.Call localVarCall = deleteNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); + return localVarApiClient.execute(localVarCall); } /** - * 删除AppNamespace (new added) (asynchronously) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除指定的Namespace (new added) (asynchronously) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (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 - +
Status Code Description Response Headers
200 AppNamespace删除成功 -
200 解除关联成功 -
*/ - public okhttp3.Call deleteAppNamespaceAsync(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteNamespaceAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + okhttp3.Call localVarCall = deleteNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for deleteNamespaceLinks + * Build call for findMissingNamespaces * @param appId 应用ID (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 - +
Status Code Description Response Headers
200 解除关联成功 -
200 缺失的命名空间名称列表 -
*/ - public okhttp3.Call deleteNamespaceLinksCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findMissingNamespacesCall(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -539,11 +539,10 @@ public okhttp3.Call deleteNamespaceLinksCall(String appId, String env, String cl Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" .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("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -551,10 +550,6 @@ public okhttp3.Call deleteNamespaceLinksCall(String appId, String env, String cl Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - final String[] localVarAccepts = { "application/json" }; @@ -571,113 +566,99 @@ public okhttp3.Call deleteNamespaceLinksCall(String appId, String env, String cl } String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNamespaceLinksValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findMissingNamespacesValidateBeforeCall(String appId, String env, 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 deleteNamespaceLinks(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findMissingNamespaces(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling deleteNamespaceLinks(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findMissingNamespaces(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling deleteNamespaceLinks(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteNamespaceLinks(Async)"); - } - - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling deleteNamespaceLinks(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findMissingNamespaces(Async)"); } - return deleteNamespaceLinksCall(appId, env, clusterName, namespaceName, operator, _callback); + return findMissingNamespacesCall(appId, env, clusterName, _callback); } /** - * 删除关联的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * 查找缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return Object + * @return List<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 解除关联成功 -
200 缺失的命名空间名称列表 -
*/ - public Object deleteNamespaceLinks(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - ApiResponse localVarResp = deleteNamespaceLinksWithHttpInfo(appId, env, clusterName, namespaceName, operator); + public List findMissingNamespaces(String appId, String env, String clusterName) throws ApiException { + ApiResponse> localVarResp = findMissingNamespacesWithHttpInfo(appId, env, clusterName); return localVarResp.getData(); } /** - * 删除关联的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * 查找缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return ApiResponse<Object> + * @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 - +
Status Code Description Response Headers
200 解除关联成功 -
200 缺失的命名空间名称列表 -
*/ - public ApiResponse deleteNamespaceLinksWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteNamespaceLinksValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findMissingNamespacesWithHttpInfo(String appId, String env, String clusterName) throws ApiException { + okhttp3.Call localVarCall = findMissingNamespacesValidateBeforeCall(appId, env, clusterName, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 删除关联的Namespace (new added) (asynchronously) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * 查找缺失的Namespace (new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * @param appId 应用ID (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 - +
Status Code Description Response Headers
200 解除关联成功 -
200 缺失的命名空间名称列表 -
*/ - public okhttp3.Call deleteNamespaceLinksAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findMissingNamespacesAsync(String appId, String env, String clusterName, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = deleteNamespaceLinksValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findMissingNamespacesValidateBeforeCall(appId, env, clusterName, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for findNamespaces + * Build call for findNamespace * @param appId (required) * @param env (required) * @param clusterName (required) + * @param namespaceName (required) * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -687,7 +668,7 @@ public okhttp3.Call deleteNamespaceLinksAsync(String appId, String env, String c 200 - */ - public okhttp3.Call findNamespacesCall(String appId, String env, String clusterName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findNamespaceCall(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -704,10 +685,11 @@ public okhttp3.Call findNamespacesCall(String appId, String env, String clusterN Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" + 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("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) + .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -719,6 +701,10 @@ public okhttp3.Call findNamespacesCall(String appId, String env, String clusterN localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); } + if (extendInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); + } + final String[] localVarAccepts = { "application/json" }; @@ -739,39 +725,46 @@ public okhttp3.Call findNamespacesCall(String appId, String env, String clusterN } @SuppressWarnings("rawtypes") - private okhttp3.Call findNamespacesValidateBeforeCall(String appId, String env, String clusterName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo, 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 findNamespaces(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findNamespace(Async)"); } // verify the required parameter 'env' is set if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findNamespaces(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling findNamespace(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespaces(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling findNamespace(Async)"); } // verify the required parameter 'fillItemDetail' is set if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling findNamespaces(Async)"); + throw new ApiException("Missing the required parameter 'fillItemDetail' when calling findNamespace(Async)"); } - return findNamespacesCall(appId, env, clusterName, fillItemDetail, _callback); + return findNamespaceCall(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo, _callback); } /** - * 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定的Namespace (original openapi) + * 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 List<OpenNamespaceDTO> + * @param extendInfo (optional, default to false) + * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -779,19 +772,21 @@ private okhttp3.Call findNamespacesValidateBeforeCall(String appId, String env,
200 -
*/ - public List findNamespaces(String appId, String env, String clusterName, Boolean fillItemDetail) throws ApiException { - ApiResponse> localVarResp = findNamespacesWithHttpInfo(appId, env, clusterName, fillItemDetail); + public OpenNamespaceDTO findNamespace(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { + ApiResponse localVarResp = findNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); return localVarResp.getData(); } /** - * 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定的Namespace (original openapi) + * 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<List<OpenNamespaceDTO>> + * @param extendInfo (optional, default to false) + * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -799,19 +794,21 @@ public List findNamespaces(String appId, String env, String cl
200 -
*/ - public ApiResponse> findNamespacesWithHttpInfo(String appId, String env, String clusterName, Boolean fillItemDetail) throws ApiException { - okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse findNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { + okhttp3.Call localVarCall = findNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定集群下的所有Namespace (original openapi) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定的Namespace (original openapi) (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 extendInfo (optional, default to false) * @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 @@ -821,16 +818,18 @@ public ApiResponse> findNamespacesWithHttpInfo(String app 200 - */ - public okhttp3.Call findNamespacesAsync(String appId, String env, String clusterName, Boolean fillItemDetail, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call findNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = findNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAppNamespace + * Build call for findNamespaceUsage * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -838,10 +837,10 @@ public okhttp3.Call findNamespacesAsync(String appId, String env, String cluster * @http.response.details - +
Status Code Description Response Headers
200 成功获取AppNamespace -
200 NamespaceUsage查询成功 -
*/ - public okhttp3.Call getAppNamespaceCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findNamespaceUsageCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -858,8 +857,10 @@ public okhttp3.Call getAppNamespaceCall(String appId, String namespaceName, fina Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" .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(); @@ -888,62 +889,78 @@ public okhttp3.Call getAppNamespaceCall(String appId, String namespaceName, fina } @SuppressWarnings("rawtypes") - private okhttp3.Call getAppNamespaceValidateBeforeCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findNamespaceUsageValidateBeforeCall(String appId, String env, String clusterName, 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 getAppNamespace(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findNamespaceUsage(Async)"); + } + + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling findNamespaceUsage(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespaceUsage(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getAppNamespace(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling findNamespaceUsage(Async)"); } - return getAppNamespaceCall(appId, namespaceName, _callback); + return findNamespaceUsageCall(appId, env, clusterName, namespaceName, _callback); } /** - * 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 查询namespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @return OpenAppNamespaceDTO + * @return List<OpenNamespaceUsageDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 成功获取AppNamespace -
200 NamespaceUsage查询成功 -
*/ - public OpenAppNamespaceDTO getAppNamespace(String appId, String namespaceName) throws ApiException { - ApiResponse localVarResp = getAppNamespaceWithHttpInfo(appId, namespaceName); + public List findNamespaceUsage(String appId, String env, String clusterName, String namespaceName) throws ApiException { + ApiResponse> localVarResp = findNamespaceUsageWithHttpInfo(appId, env, clusterName, namespaceName); return localVarResp.getData(); } /** - * 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 查询namespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @return ApiResponse<OpenAppNamespaceDTO> + * @return ApiResponse<List<OpenNamespaceUsageDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 成功获取AppNamespace -
200 NamespaceUsage查询成功 -
*/ - public ApiResponse getAppNamespaceWithHttpInfo(String appId, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getAppNamespaceValidateBeforeCall(appId, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> findNamespaceUsageWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { + okhttp3.Call localVarCall = findNamespaceUsageValidateBeforeCall(appId, env, clusterName, namespaceName, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定的AppNamespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 查询namespace使用情况(new added) (asynchronously) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage * @param appId 应用ID (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 @@ -951,19 +968,23 @@ public ApiResponse getAppNamespaceWithHttpInfo(String appId * @http.response.details - +
Status Code Description Response Headers
200 成功获取AppNamespace -
200 NamespaceUsage查询成功 -
*/ - public okhttp3.Call getAppNamespaceAsync(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findNamespaceUsageAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getAppNamespaceValidateBeforeCall(appId, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findNamespaceUsageValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAppNamespaces - * @param publicOnly (required) + * Build call for findNamespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -973,7 +994,7 @@ public okhttp3.Call getAppNamespaceAsync(String appId, String namespaceName, fin 200 - */ - public okhttp3.Call getAppNamespacesCall(Boolean publicOnly, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findNamespacesCall(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -990,7 +1011,10 @@ public okhttp3.Call getAppNamespacesCall(Boolean publicOnly, final ApiCallback _ Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/appnamespaces"; + 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(); @@ -998,8 +1022,12 @@ public okhttp3.Call getAppNamespacesCall(Boolean publicOnly, final ApiCallback _ Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (publicOnly != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("publicOnly", publicOnly)); + if (fillItemDetail != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); + } + + if (extendInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); } final String[] localVarAccepts = { @@ -1022,21 +1050,40 @@ public okhttp3.Call getAppNamespacesCall(Boolean publicOnly, final ApiCallback _ } @SuppressWarnings("rawtypes") - private okhttp3.Call getAppNamespacesValidateBeforeCall(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 getAppNamespaces(Async)"); + private okhttp3.Call findNamespacesValidateBeforeCall(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo, 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 findNamespaces(Async)"); } - return getAppNamespacesCall(publicOnly, _callback); + // verify the required parameter 'env' is set + if (env == null) { + throw new ApiException("Missing the required parameter 'env' when calling findNamespaces(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespaces(Async)"); + } + + // verify the required parameter 'fillItemDetail' is set + if (fillItemDetail == null) { + throw new ApiException("Missing the required parameter 'fillItemDetail' when calling findNamespaces(Async)"); + } + + return findNamespacesCall(appId, env, clusterName, fillItemDetail, extendInfo, _callback); } /** - * 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) - * @return List<OpenAppNamespaceDTO> + * 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) + * @return List<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1044,16 +1091,20 @@ private okhttp3.Call getAppNamespacesValidateBeforeCall(Boolean publicOnly, fina
200 -
*/ - public List getAppNamespaces(Boolean publicOnly) throws ApiException { - ApiResponse> localVarResp = getAppNamespacesWithHttpInfo(publicOnly); + public List findNamespaces(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { + ApiResponse> localVarResp = findNamespacesWithHttpInfo(appId, env, clusterName, fillItemDetail, extendInfo); return localVarResp.getData(); } /** - * 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> + * 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) + * @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 @@ -1061,16 +1112,20 @@ public List getAppNamespaces(Boolean publicOnly) throws Api
200 -
*/ - public ApiResponse> getAppNamespacesWithHttpInfo(Boolean publicOnly) throws ApiException { - okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(publicOnly, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> findNamespacesWithHttpInfo(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { + okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, extendInfo, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取所有公共AppNamespace (new added) (asynchronously) - * GET /openapi/v1/appnamespaces?public=true - * @param publicOnly (required) + * 获取指定集群下的所有Namespace (original openapi) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) * @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 @@ -1080,26 +1135,30 @@ public ApiResponse> getAppNamespacesWithHttpInfo(Boole 200 - */ - public okhttp3.Call getAppNamespacesAsync(Boolean publicOnly, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call findNamespacesAsync(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(publicOnly, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, extendInfo, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAppNamespacesByApp - * @param appId (required) + * Build call for findPublicNamespaceForAssociatedNamespace + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 关联Namespace名称 (required) + * @param extendInfo (optional, default to false) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace详情 -
*/ - public okhttp3.Call getAppNamespacesByAppCall(String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findPublicNamespaceForAssociatedNamespaceCall(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1116,8 +1175,11 @@ public okhttp3.Call getAppNamespacesByAppCall(String appId, final ApiCallback _c Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" + .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(); @@ -1125,6 +1187,10 @@ public okhttp3.Call getAppNamespacesByAppCall(String appId, final ApiCallback _c Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (extendInfo != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1145,221 +1211,95 @@ public okhttp3.Call getAppNamespacesByAppCall(String appId, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call getAppNamespacesByAppValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call findPublicNamespaceForAssociatedNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo, 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 findPublicNamespaceForAssociatedNamespace(Async)"); + } + // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getAppNamespacesByApp(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling findPublicNamespaceForAssociatedNamespace(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling findPublicNamespaceForAssociatedNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling findPublicNamespaceForAssociatedNamespace(Async)"); } - return getAppNamespacesByAppCall(appId, _callback); + return findPublicNamespaceForAssociatedNamespaceCall(env, appId, clusterName, namespaceName, extendInfo, _callback); } /** - * 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return List<OpenAppNamespaceDTO> + * 查询关联Namespace对应的公共Namespace详情 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 关联Namespace名称 (required) + * @param extendInfo (optional, default to false) + * @return OpenNamespaceDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace详情 -
*/ - public List getAppNamespacesByApp(String appId) throws ApiException { - ApiResponse> localVarResp = getAppNamespacesByAppWithHttpInfo(appId); + public OpenNamespaceDTO findPublicNamespaceForAssociatedNamespace(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { + ApiResponse localVarResp = findPublicNamespaceForAssociatedNamespaceWithHttpInfo(env, appId, clusterName, namespaceName, extendInfo); return localVarResp.getData(); } /** - * 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> + * 查询关联Namespace对应的公共Namespace详情 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 关联Namespace名称 (required) + * @param extendInfo (optional, default to false) + * @return ApiResponse<OpenNamespaceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace详情 -
*/ - public ApiResponse> getAppNamespacesByAppWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getAppNamespacesByAppValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse findPublicNamespaceForAssociatedNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { + okhttp3.Call localVarCall = findPublicNamespaceForAssociatedNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, extendInfo, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取指定应用的AppNamespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) + * 查询关联Namespace对应的公共Namespace详情 (new added) (asynchronously) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 关联Namespace名称 (required) + * @param extendInfo (optional, default to false) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - +
Status Code Description Response Headers
200 -
200 成功获取关联的公共Namespace详情 -
*/ - public okhttp3.Call getAppNamespacesByAppAsync(String appId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call findPublicNamespaceForAssociatedNamespaceAsync(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAppNamespacesByAppValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getNamespaceLock - * @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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceLockCall(String appId, String env, String clusterName, 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 getNamespaceLockValidateBeforeCall(String appId, String env, String clusterName, 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 getNamespaceLock(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getNamespaceLock(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getNamespaceLock(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getNamespaceLock(Async)"); - } - - return getNamespaceLockCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取Namespace的锁状态 (original openapi) - * 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 - - - -
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceLockDTO getNamespaceLock(String appId, String env, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = getNamespaceLockWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取Namespace的锁状态 (original openapi) - * 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 - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse getNamespaceLockWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取Namespace的锁状态 (original openapi) (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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceLockAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = findPublicNamespaceForAssociatedNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, extendInfo, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1486,482 +1426,4 @@ public okhttp3.Call getNamespacesReleaseStatusAsync(String appId, final ApiCallb localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getPublicAppNamespaceInstances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public okhttp3.Call getPublicAppNamespaceInstancesCall(String env, String publicNamespaceName, Integer page, 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 getPublicAppNamespaceInstancesValidateBeforeCall(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getPublicAppNamespaceInstances(Async)"); - } - - // verify the required parameter 'publicNamespaceName' is set - if (publicNamespaceName == null) { - throw new ApiException("Missing the required parameter 'publicNamespaceName' when calling getPublicAppNamespaceInstances(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling getPublicAppNamespaceInstances(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling getPublicAppNamespaceInstances(Async)"); - } - - return getPublicAppNamespaceInstancesCall(env, publicNamespaceName, page, size, _callback); - - } - - /** - * 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (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 - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public List getPublicAppNamespaceInstances(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = getPublicAppNamespaceInstancesWithHttpInfo(env, publicNamespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (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 - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public ApiResponse> getPublicAppNamespaceInstancesWithHttpInfo(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取公共AppNamespace的所有实例 (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public okhttp3.Call getPublicAppNamespaceInstancesAsync(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPublicNamespaceAssociation - * @param appId 应用ID (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 - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace -
- */ - public okhttp3.Call getPublicNamespaceAssociationCall(String appId, String env, String clusterName, 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 getPublicNamespaceAssociationValidateBeforeCall(String appId, String env, String clusterName, 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 getPublicNamespaceAssociation(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getPublicNamespaceAssociation(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getPublicNamespaceAssociation(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getPublicNamespaceAssociation(Async)"); - } - - return getPublicNamespaceAssociationCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取关联的公共Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId 应用ID (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 - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace -
- */ - public OpenNamespaceDTO getPublicNamespaceAssociation(String appId, String env, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = getPublicNamespaceAssociationWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取关联的公共Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId 应用ID (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 - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace -
- */ - public ApiResponse getPublicNamespaceAssociationWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getPublicNamespaceAssociationValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取关联的公共Namespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * @param appId 应用ID (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 - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace -
- */ - public okhttp3.Call getPublicNamespaceAssociationAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPublicNamespaceAssociationValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for loadNamespace - * @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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call loadNamespaceCall(String appId, String env, String clusterName, String namespaceName, 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 loadNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, 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 loadNamespace(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling loadNamespace(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling loadNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling loadNamespace(Async)"); - } - - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling loadNamespace(Async)"); - } - - return loadNamespaceCall(appId, env, clusterName, namespaceName, fillItemDetail, _callback); - - } - - /** - * 获取指定的Namespace (original openapi) - * 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 - - - -
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceDTO loadNamespace(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail) throws ApiException { - ApiResponse localVarResp = loadNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, fillItemDetail); - return localVarResp.getData(); - } - - /** - * 获取指定的Namespace (original openapi) - * 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 - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse loadNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail) throws ApiException { - okhttp3.Call localVarCall = loadNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定的Namespace (original openapi) (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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call loadNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = loadNamespaceValidateBeforeCall(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/ReleaseManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java index c7fde5d..4550557 100644 --- a/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java @@ -1242,205 +1242,11 @@ public okhttp3.Call loadLatestActiveReleaseAsync(String appId, String env, Strin localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for merge - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (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 - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call mergeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, 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 mergeValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, 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 merge(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling merge(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling merge(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling merge(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling merge(Async)"); - } - - // verify the required parameter 'deleteBranch' is set - if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling merge(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling merge(Async)"); - } - - return mergeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - - } - - /** - * 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * @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 OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public OpenReleaseDTO merge(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = mergeWithHttpInfo(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * @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 ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public ApiResponse mergeWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 合并分支 (original openapi) (asynchronously) - * 合并灰度分支并可选择删除分支 - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (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 - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call mergeAsync(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for rollback * @param env 环境标识 (required) * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1512,11 +1318,6 @@ private okhttp3.Call rollbackValidateBeforeCall(String env, Long releaseId, Stri throw new ApiException("Missing the required parameter 'releaseId' when calling rollback(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling rollback(Async)"); - } - return rollbackCall(env, releaseId, operator, _callback); } @@ -1526,7 +1327,7 @@ private okhttp3.Call rollbackValidateBeforeCall(String env, Long releaseId, Stri * 回滚到指定的发布版本 * @param env 环境标识 (required) * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1545,7 +1346,7 @@ public Object rollback(String env, Long releaseId, String operator) throws ApiEx * 回滚到指定的发布版本 * @param env 环境标识 (required) * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1565,7 +1366,7 @@ public ApiResponse rollbackWithHttpInfo(String env, Long releaseId, Stri * 回滚到指定的发布版本 * @param env 环境标识 (required) * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (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 diff --git a/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateItemDTO.java similarity index 50% rename from java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java rename to java-client/src/main/java/org/openapitools/client/model/OpenCreateItemDTO.java index cff4275..85114d2 100644 --- a/java-client/src/main/java/org/openapitools/client/model/MultiResponseEntity.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenCreateItemDTO.java @@ -21,9 +21,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.RichResponseEntity; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -51,68 +48,110 @@ import org.openapitools.client.JSON; /** - * A response container holding multiple RichResponseEntity objects + * OpenCreateItemDTO */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MultiResponseEntity { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; +public class OpenCreateItemDTO { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private Integer type; - public static final String SERIALIZED_NAME_ENTITIES = "entities"; - @SerializedName(SERIALIZED_NAME_ENTITIES) - private List entities = new ArrayList<>(); + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; - public MultiResponseEntity() { + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + private String comment; + + public OpenCreateItemDTO() { } - public MultiResponseEntity code(Integer code) { + public OpenCreateItemDTO key(String key) { - this.code = code; + this.key = key; return this; } /** - * Overall HTTP status code - * @return code + * 配置项的键名,在同一命名空间内唯一标识一个配置项 + * @return key **/ - @javax.annotation.Nonnull - public Integer getCode() { - return code; + @javax.annotation.Nullable + public String getKey() { + return key; } - public void setCode(Integer code) { - this.code = code; + public void setKey(String key) { + this.key = key; } - public MultiResponseEntity entities(List entities) { + public OpenCreateItemDTO type(Integer type) { - this.entities = entities; + this.type = type; return this; } - public MultiResponseEntity addEntitiesItem(RichResponseEntity entitiesItem) { - if (this.entities == null) { - this.entities = new ArrayList<>(); - } - this.entities.add(entitiesItem); + /** + * 配置项类型,0表示普通配置项,1表示文件类型配置项 + * @return type + **/ + @javax.annotation.Nullable + public Integer getType() { + return type; + } + + + public void setType(Integer type) { + this.type = type; + } + + + public OpenCreateItemDTO value(String value) { + + this.value = value; return this; } /** - * List of rich response entities - * @return entities + * 配置项的值,可以是字符串、数字、JSON等格式 + * @return value **/ - @javax.annotation.Nonnull - public List getEntities() { - return entities; + @javax.annotation.Nullable + public String getValue() { + return value; } - public void setEntities(List entities) { - this.entities = entities; + public void setValue(String value) { + this.value = value; + } + + + public OpenCreateItemDTO comment(String comment) { + + this.comment = comment; + return this; + } + + /** + * 配置项的注释说明,用于描述配置项的用途和含义 + * @return comment + **/ + @javax.annotation.Nullable + public String getComment() { + return comment; + } + + + public void setComment(String comment) { + this.comment = comment; } @@ -125,22 +164,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - MultiResponseEntity multiResponseEntity = (MultiResponseEntity) o; - return Objects.equals(this.code, multiResponseEntity.code) && - Objects.equals(this.entities, multiResponseEntity.entities); + OpenCreateItemDTO openCreateItemDTO = (OpenCreateItemDTO) o; + return Objects.equals(this.key, openCreateItemDTO.key) && + Objects.equals(this.type, openCreateItemDTO.type) && + Objects.equals(this.value, openCreateItemDTO.value) && + Objects.equals(this.comment, openCreateItemDTO.comment); } @Override public int hashCode() { - return Objects.hash(code, entities); + return Objects.hash(key, type, value, comment); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class MultiResponseEntity {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); + sb.append("class OpenCreateItemDTO {\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(); } @@ -163,74 +206,66 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("entities"); + openapiFields.add("key"); + openapiFields.add("type"); + openapiFields.add("value"); + openapiFields.add("comment"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("entities"); } /** * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to MultiResponseEntity + * @throws IOException if the JSON Object is invalid with respect to OpenCreateItemDTO */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!MultiResponseEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiResponseEntity is not found in the empty JSON string", MultiResponseEntity.openapiRequiredFields.toString())); + if (!OpenCreateItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenCreateItemDTO is not found in the empty JSON string", OpenCreateItemDTO.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!MultiResponseEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MultiResponseEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!OpenCreateItemDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenCreateItemDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : MultiResponseEntity.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.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())); } - // ensure the json data is an array - if (!jsonObj.get("entities").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `entities` to be an array in the JSON string but got `%s`", jsonObj.get("entities").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())); } - - JsonArray jsonArrayentities = jsonObj.getAsJsonArray("entities"); - // validate the required field `entities` (array) - for (int i = 0; i < jsonArrayentities.size(); i++) { - RichResponseEntity.validateJsonObject(jsonArrayentities.get(i).getAsJsonObject()); - }; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!MultiResponseEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'MultiResponseEntity' and its subtypes + if (!OpenCreateItemDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenCreateItemDTO' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(MultiResponseEntity.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenCreateItemDTO.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, MultiResponseEntity value) throws IOException { + public void write(JsonWriter out, OpenCreateItemDTO value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public MultiResponseEntity read(JsonReader in) throws IOException { + public OpenCreateItemDTO read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -241,18 +276,18 @@ public MultiResponseEntity read(JsonReader in) throws IOException { } /** - * Create an instance of MultiResponseEntity given an JSON string + * Create an instance of OpenCreateItemDTO given an JSON string * * @param jsonString JSON string - * @return An instance of MultiResponseEntity - * @throws IOException if the JSON string is invalid with respect to MultiResponseEntity + * @return An instance of OpenCreateItemDTO + * @throws IOException if the JSON string is invalid with respect to OpenCreateItemDTO */ - public static MultiResponseEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, MultiResponseEntity.class); + public static OpenCreateItemDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenCreateItemDTO.class); } /** - * Convert an instance of MultiResponseEntity to an JSON string + * Convert an instance of OpenCreateItemDTO to an JSON string * * @return JSON string */ diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java new file mode 100644 index 0000000..87f27eb --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java @@ -0,0 +1,300 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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 java.util.Arrays; +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 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.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OpenCreateNamespaceDTO { + public static final String SERIALIZED_NAME_APP_ID = "appId"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_ENV = "env"; + @SerializedName(SERIALIZED_NAME_ENV) + private String env; + + public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; + @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) + private String clusterName; + + public static final String SERIALIZED_NAME_APP_NAMESPACE_NAME = "appNamespaceName"; + @SerializedName(SERIALIZED_NAME_APP_NAMESPACE_NAME) + private String appNamespaceName; + + public OpenCreateNamespaceDTO() { + } + + public OpenCreateNamespaceDTO appId(String appId) { + + this.appId = appId; + return this; + } + + /** + * 所属应用的唯一标识符 + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + + public OpenCreateNamespaceDTO env(String env) { + + this.env = env; + return this; + } + + /** + * 所在那个环境创建 + * @return env + **/ + @javax.annotation.Nullable + public String getEnv() { + return env; + } + + + public void setEnv(String env) { + this.env = env; + } + + + public OpenCreateNamespaceDTO clusterName(String clusterName) { + + this.clusterName = clusterName; + return this; + } + + /** + * 所属集群的名称 + * @return clusterName + **/ + @javax.annotation.Nullable + public String getClusterName() { + return clusterName; + } + + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + + public OpenCreateNamespaceDTO appNamespaceName(String appNamespaceName) { + + this.appNamespaceName = appNamespaceName; + return this; + } + + /** + * 根据已创建的appnamespace来实例化namespace + * @return appNamespaceName + **/ + @javax.annotation.Nullable + public String getAppNamespaceName() { + return appNamespaceName; + } + + + public void setAppNamespaceName(String appNamespaceName) { + this.appNamespaceName = appNamespaceName; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenCreateNamespaceDTO openCreateNamespaceDTO = (OpenCreateNamespaceDTO) o; + return Objects.equals(this.appId, openCreateNamespaceDTO.appId) && + Objects.equals(this.env, openCreateNamespaceDTO.env) && + Objects.equals(this.clusterName, openCreateNamespaceDTO.clusterName) && + Objects.equals(this.appNamespaceName, openCreateNamespaceDTO.appNamespaceName); + } + + @Override + public int hashCode() { + return Objects.hash(appId, env, clusterName, appNamespaceName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenCreateNamespaceDTO {\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(" appNamespaceName: ").append(toIndentedString(appNamespaceName)).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(); + openapiFields.add("appId"); + openapiFields.add("env"); + openapiFields.add("clusterName"); + openapiFields.add("appNamespaceName"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OpenCreateNamespaceDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenCreateNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenCreateNamespaceDTO is not found in the empty JSON string", OpenCreateNamespaceDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OpenCreateNamespaceDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenCreateNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonObj.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("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("appNamespaceName") != null && !jsonObj.get("appNamespaceName").isJsonNull()) && !jsonObj.get("appNamespaceName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `appNamespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appNamespaceName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenCreateNamespaceDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenCreateNamespaceDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenCreateNamespaceDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenCreateNamespaceDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenCreateNamespaceDTO read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpenCreateNamespaceDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenCreateNamespaceDTO + * @throws IOException if the JSON string is invalid with respect to OpenCreateNamespaceDTO + */ + public static OpenCreateNamespaceDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenCreateNamespaceDTO.class); + } + + /** + * Convert an instance of OpenCreateNamespaceDTO 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 index aa5d361..070461e 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java @@ -21,8 +21,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; +import java.util.LinkedHashSet; +import java.util.Set; import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; import com.google.gson.Gson; @@ -89,7 +89,7 @@ public class OpenGrayReleaseRuleDTO { public static final String SERIALIZED_NAME_RULE_ITEMS = "ruleItems"; @SerializedName(SERIALIZED_NAME_RULE_ITEMS) - private List ruleItems; + private Set ruleItems; public OpenGrayReleaseRuleDTO() { } @@ -262,7 +262,7 @@ public void setBranchName(String branchName) { } - public OpenGrayReleaseRuleDTO ruleItems(List ruleItems) { + public OpenGrayReleaseRuleDTO ruleItems(Set ruleItems) { this.ruleItems = ruleItems; return this; @@ -270,7 +270,7 @@ public OpenGrayReleaseRuleDTO ruleItems(List ruleIte public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleItemsItem) { if (this.ruleItems == null) { - this.ruleItems = new ArrayList<>(); + this.ruleItems = new LinkedHashSet<>(); } this.ruleItems.add(ruleItemsItem); return this; @@ -281,12 +281,12 @@ public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleIt * @return ruleItems **/ @javax.annotation.Nullable - public List getRuleItems() { + public Set getRuleItems() { return ruleItems; } - public void setRuleItems(List ruleItems) { + public void setRuleItems(Set ruleItems) { this.ruleItems = ruleItems; } 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 index 8e5f183..b53bcf5 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java @@ -21,8 +21,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; +import java.util.LinkedHashSet; +import java.util.Set; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -60,11 +60,11 @@ public class OpenGrayReleaseRuleItemDTO { public static final String SERIALIZED_NAME_CLIENT_IP_LIST = "clientIpList"; @SerializedName(SERIALIZED_NAME_CLIENT_IP_LIST) - private List clientIpList; + private Set clientIpList; public static final String SERIALIZED_NAME_CLIENT_LABEL_LIST = "clientLabelList"; @SerializedName(SERIALIZED_NAME_CLIENT_LABEL_LIST) - private List clientLabelList; + private Set clientLabelList; public OpenGrayReleaseRuleItemDTO() { } @@ -90,7 +90,7 @@ public void setClientAppId(String clientAppId) { } - public OpenGrayReleaseRuleItemDTO clientIpList(List clientIpList) { + public OpenGrayReleaseRuleItemDTO clientIpList(Set clientIpList) { this.clientIpList = clientIpList; return this; @@ -98,7 +98,7 @@ public OpenGrayReleaseRuleItemDTO clientIpList(List clientIpList) { public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { if (this.clientIpList == null) { - this.clientIpList = new ArrayList<>(); + this.clientIpList = new LinkedHashSet<>(); } this.clientIpList.add(clientIpListItem); return this; @@ -109,17 +109,17 @@ public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { * @return clientIpList **/ @javax.annotation.Nullable - public List getClientIpList() { + public Set getClientIpList() { return clientIpList; } - public void setClientIpList(List clientIpList) { + public void setClientIpList(Set clientIpList) { this.clientIpList = clientIpList; } - public OpenGrayReleaseRuleItemDTO clientLabelList(List clientLabelList) { + public OpenGrayReleaseRuleItemDTO clientLabelList(Set clientLabelList) { this.clientLabelList = clientLabelList; return this; @@ -127,7 +127,7 @@ public OpenGrayReleaseRuleItemDTO clientLabelList(List clientLabelList) public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListItem) { if (this.clientLabelList == null) { - this.clientLabelList = new ArrayList<>(); + this.clientLabelList = new LinkedHashSet<>(); } this.clientLabelList.add(clientLabelListItem); return this; @@ -138,12 +138,12 @@ public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListI * @return clientLabelList **/ @javax.annotation.Nullable - public List getClientLabelList() { + public Set getClientLabelList() { return clientLabelList; } - public void setClientLabelList(List clientLabelList) { + public void setClientLabelList(Set clientLabelList) { this.clientLabelList = clientLabelList; } 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 index ba711a0..908e6bb 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java @@ -21,6 +21,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import org.openapitools.client.model.OpenItemExtendDTO; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -48,10 +49,30 @@ import org.openapitools.client.JSON; /** - * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + * Apollo配置项核心数据对象,仅包含键值及基础审计信息 */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class OpenItemDTO { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_VALUE = "value"; + @SerializedName(SERIALIZED_NAME_VALUE) + private String value; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private Integer type; + + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + private String comment; + + public static final String SERIALIZED_NAME_EXTEND_INFO = "extendInfo"; + @SerializedName(SERIALIZED_NAME_EXTEND_INFO) + private OpenItemExtendDTO extendInfo; + public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) private String dataChangeCreatedBy; @@ -68,190 +89,195 @@ public class OpenItemDTO { @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) private String dataChangeLastModifiedTime; - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; + public OpenItemDTO() { + } - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private Integer type; + public OpenItemDTO key(String key) { - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; + this.key = key; + return this; + } - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; + /** + * 配置项的键名,在同一命名空间内唯一标识一个配置项 + * @return key + **/ + @javax.annotation.Nullable + public String getKey() { + return key; + } - public OpenItemDTO() { + + public void setKey(String key) { + this.key = key; } - public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; + public OpenItemDTO value(String value) { + + this.value = value; return this; } /** - * 配置项创建者用户名,记录是谁创建了这个配置项 - * @return dataChangeCreatedBy + * 配置项的值,可以是字符串、数字、JSON等格式 + * @return value **/ @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; + public String getValue() { + return value; } - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; + public void setValue(String value) { + this.value = value; } - public OpenItemDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + public OpenItemDTO type(Integer type) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; + this.type = type; return this; } /** - * 配置项最后修改者用户名,记录最后一次修改配置的用户 - * @return dataChangeLastModifiedBy + * 配置项类型 + * @return type **/ @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; + public Integer getType() { + return type; } - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; + public void setType(Integer type) { + this.type = type; } - public OpenItemDTO dataChangeCreatedTime(String dataChangeCreatedTime) { + public OpenItemDTO comment(String comment) { - this.dataChangeCreatedTime = dataChangeCreatedTime; + this.comment = comment; return this; } /** - * 配置项创建时间,ISO 8601格式的时间戳 - * @return dataChangeCreatedTime + * 配置项的注释说明,用于描述配置项的用途和含义 + * @return comment **/ @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; + public String getComment() { + return comment; } - public void setDataChangeCreatedTime(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; + public void setComment(String comment) { + this.comment = comment; } - public OpenItemDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + public OpenItemDTO extendInfo(OpenItemExtendDTO extendInfo) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; + this.extendInfo = extendInfo; return this; } /** - * 配置项最后修改时间,ISO 8601格式的时间戳 - * @return dataChangeLastModifiedTime + * Get extendInfo + * @return extendInfo **/ @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; + public OpenItemExtendDTO getExtendInfo() { + return extendInfo; } - public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; + public void setExtendInfo(OpenItemExtendDTO extendInfo) { + this.extendInfo = extendInfo; } - public OpenItemDTO key(String key) { + public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - this.key = key; + this.dataChangeCreatedBy = dataChangeCreatedBy; return this; } /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @return key + * 配置项创建者用户名,记录是谁创建了这个配置项 + * @return dataChangeCreatedBy **/ @javax.annotation.Nullable - public String getKey() { - return key; + public String getDataChangeCreatedBy() { + return dataChangeCreatedBy; } - public void setKey(String key) { - this.key = key; + public void setDataChangeCreatedBy(String dataChangeCreatedBy) { + this.dataChangeCreatedBy = dataChangeCreatedBy; } - public OpenItemDTO type(Integer type) { + public OpenItemDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.type = type; + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; return this; } /** - * 配置项类型,0表示普通配置项,1表示文件类型配置项 - * @return type + * 配置项最后修改者用户名,记录最后一次修改配置的用户 + * @return dataChangeLastModifiedBy **/ @javax.annotation.Nullable - public Integer getType() { - return type; + public String getDataChangeLastModifiedBy() { + return dataChangeLastModifiedBy; } - public void setType(Integer type) { - this.type = type; + public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { + this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; } - public OpenItemDTO value(String value) { + public OpenItemDTO dataChangeCreatedTime(String dataChangeCreatedTime) { - this.value = value; + this.dataChangeCreatedTime = dataChangeCreatedTime; return this; } /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @return value + * 配置项创建时间,ISO 8601格式的时间戳 + * @return dataChangeCreatedTime **/ @javax.annotation.Nullable - public String getValue() { - return value; + public String getDataChangeCreatedTime() { + return dataChangeCreatedTime; } - public void setValue(String value) { - this.value = value; + public void setDataChangeCreatedTime(String dataChangeCreatedTime) { + this.dataChangeCreatedTime = dataChangeCreatedTime; } - public OpenItemDTO comment(String comment) { + public OpenItemDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { - this.comment = comment; + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; return this; } /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @return comment + * 配置项最后修改时间,ISO 8601格式的时间戳 + * @return dataChangeLastModifiedTime **/ @javax.annotation.Nullable - public String getComment() { - return comment; + public String getDataChangeLastModifiedTime() { + return dataChangeLastModifiedTime; } - public void setComment(String comment) { - this.comment = comment; + public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { + this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } @@ -265,33 +291,35 @@ public boolean equals(Object o) { return false; } OpenItemDTO openItemDTO = (OpenItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openItemDTO.dataChangeCreatedBy) && + return Objects.equals(this.key, openItemDTO.key) && + Objects.equals(this.value, openItemDTO.value) && + Objects.equals(this.type, openItemDTO.type) && + Objects.equals(this.comment, openItemDTO.comment) && + Objects.equals(this.extendInfo, openItemDTO.extendInfo) && + 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); + Objects.equals(this.dataChangeLastModifiedTime, openItemDTO.dataChangeLastModifiedTime); } @Override public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, key, type, value, comment); + return Objects.hash(key, value, type, comment, extendInfo, dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenItemDTO {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" extendInfo: ").append(toIndentedString(extendInfo)).append("\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(); } @@ -314,14 +342,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("value"); + openapiFields.add("type"); + openapiFields.add("comment"); + openapiFields.add("extendInfo"); openapiFields.add("dataChangeCreatedBy"); openapiFields.add("dataChangeLastModifiedBy"); openapiFields.add("dataChangeCreatedTime"); openapiFields.add("dataChangeLastModifiedTime"); - openapiFields.add("key"); - openapiFields.add("type"); - openapiFields.add("value"); - openapiFields.add("comment"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -347,6 +376,19 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDTO` properties. JSON: %s", entry.getKey(), jsonObj.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())); + } + // validate the optional field `extendInfo` + if (jsonObj.get("extendInfo") != null && !jsonObj.get("extendInfo").isJsonNull()) { + OpenItemExtendDTO.validateJsonObject(jsonObj.getAsJsonObject("extendInfo")); + } 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())); } @@ -359,15 +401,6 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { 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 { diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java new file mode 100644 index 0000000..6a8d965 --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java @@ -0,0 +1,421 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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 java.util.Arrays; +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.List; +import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenNamespaceIdentifier; + +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.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * OpenItemDiffDTO + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OpenItemDiffDTO { + public static final String SERIALIZED_NAME_CODE = "code"; + @SerializedName(SERIALIZED_NAME_CODE) + private Integer code; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; + @SerializedName(SERIALIZED_NAME_NAMESPACE) + private OpenNamespaceIdentifier namespace; + + public static final String SERIALIZED_NAME_CREATE_ITEMS = "createItems"; + @SerializedName(SERIALIZED_NAME_CREATE_ITEMS) + private List createItems; + + public static final String SERIALIZED_NAME_DELETE_ITEMS = "deleteItems"; + @SerializedName(SERIALIZED_NAME_DELETE_ITEMS) + private List deleteItems; + + public static final String SERIALIZED_NAME_UPDATE_ITEMS = "updateItems"; + @SerializedName(SERIALIZED_NAME_UPDATE_ITEMS) + private List updateItems; + + public OpenItemDiffDTO() { + } + + public OpenItemDiffDTO code(Integer code) { + + this.code = code; + return this; + } + + /** + * 查找结果 + * @return code + **/ + @javax.annotation.Nullable + public Integer getCode() { + return code; + } + + + public void setCode(Integer code) { + this.code = code; + } + + + public OpenItemDiffDTO message(String message) { + + this.message = message; + return this; + } + + /** + * 查找结果信息 + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + public OpenItemDiffDTO namespace(OpenNamespaceIdentifier namespace) { + + this.namespace = namespace; + return this; + } + + /** + * Get namespace + * @return namespace + **/ + @javax.annotation.Nullable + public OpenNamespaceIdentifier getNamespace() { + return namespace; + } + + + public void setNamespace(OpenNamespaceIdentifier namespace) { + this.namespace = namespace; + } + + + public OpenItemDiffDTO createItems(List createItems) { + + this.createItems = createItems; + return this; + } + + public OpenItemDiffDTO addCreateItemsItem(OpenItemDTO createItemsItem) { + if (this.createItems == null) { + this.createItems = new ArrayList<>(); + } + this.createItems.add(createItemsItem); + return this; + } + + /** + * Get createItems + * @return createItems + **/ + @javax.annotation.Nullable + public List getCreateItems() { + return createItems; + } + + + public void setCreateItems(List createItems) { + this.createItems = createItems; + } + + + public OpenItemDiffDTO deleteItems(List deleteItems) { + + this.deleteItems = deleteItems; + return this; + } + + public OpenItemDiffDTO addDeleteItemsItem(OpenItemDTO deleteItemsItem) { + if (this.deleteItems == null) { + this.deleteItems = new ArrayList<>(); + } + this.deleteItems.add(deleteItemsItem); + return this; + } + + /** + * Get deleteItems + * @return deleteItems + **/ + @javax.annotation.Nullable + public List getDeleteItems() { + return deleteItems; + } + + + public void setDeleteItems(List deleteItems) { + this.deleteItems = deleteItems; + } + + + public OpenItemDiffDTO updateItems(List updateItems) { + + this.updateItems = updateItems; + return this; + } + + public OpenItemDiffDTO addUpdateItemsItem(OpenItemDTO updateItemsItem) { + if (this.updateItems == null) { + this.updateItems = new ArrayList<>(); + } + this.updateItems.add(updateItemsItem); + return this; + } + + /** + * Get updateItems + * @return updateItems + **/ + @javax.annotation.Nullable + public List getUpdateItems() { + return updateItems; + } + + + public void setUpdateItems(List updateItems) { + this.updateItems = updateItems; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenItemDiffDTO openItemDiffDTO = (OpenItemDiffDTO) o; + return Objects.equals(this.code, openItemDiffDTO.code) && + Objects.equals(this.message, openItemDiffDTO.message) && + Objects.equals(this.namespace, openItemDiffDTO.namespace) && + Objects.equals(this.createItems, openItemDiffDTO.createItems) && + Objects.equals(this.deleteItems, openItemDiffDTO.deleteItems) && + Objects.equals(this.updateItems, openItemDiffDTO.updateItems); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, namespace, createItems, deleteItems, updateItems); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenItemDiffDTO {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); + sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); + sb.append(" updateItems: ").append(toIndentedString(updateItems)).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(); + openapiFields.add("code"); + openapiFields.add("message"); + openapiFields.add("namespace"); + openapiFields.add("createItems"); + openapiFields.add("deleteItems"); + openapiFields.add("updateItems"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OpenItemDiffDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenItemDiffDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemDiffDTO is not found in the empty JSON string", OpenItemDiffDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OpenItemDiffDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDiffDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + 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())); + } + // validate the optional field `namespace` + if (jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) { + OpenNamespaceIdentifier.validateJsonObject(jsonObj.getAsJsonObject("namespace")); + } + 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++) { + OpenItemDTO.validateJsonObject(jsonArraycreateItems.get(i).getAsJsonObject()); + }; + } + } + 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++) { + OpenItemDTO.validateJsonObject(jsonArraydeleteItems.get(i).getAsJsonObject()); + }; + } + } + 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++) { + OpenItemDTO.validateJsonObject(jsonArrayupdateItems.get(i).getAsJsonObject()); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenItemDiffDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenItemDiffDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenItemDiffDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenItemDiffDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenItemDiffDTO read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpenItemDiffDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenItemDiffDTO + * @throws IOException if the JSON string is invalid with respect to OpenItemDiffDTO + */ + public static OpenItemDiffDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenItemDiffDTO.class); + } + + /** + * Convert an instance of OpenItemDiffDTO 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/OpenItemExtendDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java new file mode 100644 index 0000000..feb3c0d --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java @@ -0,0 +1,350 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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 java.util.Arrays; +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 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.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OpenItemExtendDTO { + public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; + @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) + private Long namespaceId; + + public static final String SERIALIZED_NAME_IS_MODIFIED = "isModified"; + @SerializedName(SERIALIZED_NAME_IS_MODIFIED) + private Boolean isModified; + + public static final String SERIALIZED_NAME_IS_DELETED = "isDeleted"; + @SerializedName(SERIALIZED_NAME_IS_DELETED) + private Boolean isDeleted; + + public static final String SERIALIZED_NAME_IS_NEWLY_ADDED = "isNewlyAdded"; + @SerializedName(SERIALIZED_NAME_IS_NEWLY_ADDED) + private Boolean isNewlyAdded; + + public static final String SERIALIZED_NAME_NEW_VALUE = "newValue"; + @SerializedName(SERIALIZED_NAME_NEW_VALUE) + private String newValue; + + public static final String SERIALIZED_NAME_OLD_VALUE = "oldValue"; + @SerializedName(SERIALIZED_NAME_OLD_VALUE) + private String oldValue; + + public OpenItemExtendDTO() { + } + + public OpenItemExtendDTO namespaceId(Long namespaceId) { + + this.namespaceId = namespaceId; + return this; + } + + /** + * 所属命名空间的ID + * @return namespaceId + **/ + @javax.annotation.Nullable + public Long getNamespaceId() { + return namespaceId; + } + + + public void setNamespaceId(Long namespaceId) { + this.namespaceId = namespaceId; + } + + + public OpenItemExtendDTO isModified(Boolean isModified) { + + this.isModified = isModified; + return this; + } + + /** + * 是否有未发布的修改 + * @return isModified + **/ + @javax.annotation.Nullable + public Boolean getIsModified() { + return isModified; + } + + + public void setIsModified(Boolean isModified) { + this.isModified = isModified; + } + + + public OpenItemExtendDTO isDeleted(Boolean isDeleted) { + + this.isDeleted = isDeleted; + return this; + } + + /** + * 是否被标记为删除(未发布) + * @return isDeleted + **/ + @javax.annotation.Nullable + public Boolean getIsDeleted() { + return isDeleted; + } + + + public void setIsDeleted(Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public OpenItemExtendDTO isNewlyAdded(Boolean isNewlyAdded) { + + this.isNewlyAdded = isNewlyAdded; + return this; + } + + /** + * 是否为新添加的配置项(未发布) + * @return isNewlyAdded + **/ + @javax.annotation.Nullable + public Boolean getIsNewlyAdded() { + return isNewlyAdded; + } + + + public void setIsNewlyAdded(Boolean isNewlyAdded) { + this.isNewlyAdded = isNewlyAdded; + } + + + public OpenItemExtendDTO newValue(String newValue) { + + this.newValue = newValue; + return this; + } + + /** + * 新的值 + * @return newValue + **/ + @javax.annotation.Nullable + public String getNewValue() { + return newValue; + } + + + public void setNewValue(String newValue) { + this.newValue = newValue; + } + + + public OpenItemExtendDTO oldValue(String oldValue) { + + this.oldValue = oldValue; + return this; + } + + /** + * 上一次发布的值,用于对比变更 + * @return oldValue + **/ + @javax.annotation.Nullable + public String getOldValue() { + return oldValue; + } + + + public void setOldValue(String oldValue) { + this.oldValue = oldValue; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenItemExtendDTO openItemExtendDTO = (OpenItemExtendDTO) o; + return Objects.equals(this.namespaceId, openItemExtendDTO.namespaceId) && + Objects.equals(this.isModified, openItemExtendDTO.isModified) && + Objects.equals(this.isDeleted, openItemExtendDTO.isDeleted) && + Objects.equals(this.isNewlyAdded, openItemExtendDTO.isNewlyAdded) && + Objects.equals(this.newValue, openItemExtendDTO.newValue) && + Objects.equals(this.oldValue, openItemExtendDTO.oldValue); + } + + @Override + public int hashCode() { + return Objects.hash(namespaceId, isModified, isDeleted, isNewlyAdded, newValue, oldValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenItemExtendDTO {\n"); + sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); + sb.append(" isModified: ").append(toIndentedString(isModified)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" isNewlyAdded: ").append(toIndentedString(isNewlyAdded)).append("\n"); + sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); + sb.append(" oldValue: ").append(toIndentedString(oldValue)).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(); + openapiFields.add("namespaceId"); + openapiFields.add("isModified"); + openapiFields.add("isDeleted"); + openapiFields.add("isNewlyAdded"); + openapiFields.add("newValue"); + openapiFields.add("oldValue"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OpenItemExtendDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenItemExtendDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemExtendDTO is not found in the empty JSON string", OpenItemExtendDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OpenItemExtendDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemExtendDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + } + } + if ((jsonObj.get("newValue") != null && !jsonObj.get("newValue").isJsonNull()) && !jsonObj.get("newValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `newValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newValue").toString())); + } + if ((jsonObj.get("oldValue") != null && !jsonObj.get("oldValue").isJsonNull()) && !jsonObj.get("oldValue").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `oldValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oldValue").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenItemExtendDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenItemExtendDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenItemExtendDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenItemExtendDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenItemExtendDTO read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpenItemExtendDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenItemExtendDTO + * @throws IOException if the JSON string is invalid with respect to OpenItemExtendDTO + */ + public static OpenItemExtendDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenItemExtendDTO.class); + } + + /** + * Convert an instance of OpenItemExtendDTO 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 index 1077e24..5d02627 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenNamespaceExtendDTO; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -99,6 +100,10 @@ public class OpenNamespaceDTO { @SerializedName(SERIALIZED_NAME_ITEMS) private List items; + public static final String SERIALIZED_NAME_EXTEND_INFO = "extendInfo"; + @SerializedName(SERIALIZED_NAME_EXTEND_INFO) + private OpenNamespaceExtendDTO extendInfo; + public OpenNamespaceDTO() { } @@ -341,6 +346,27 @@ public void setItems(List items) { } + public OpenNamespaceDTO extendInfo(OpenNamespaceExtendDTO extendInfo) { + + this.extendInfo = extendInfo; + return this; + } + + /** + * Get extendInfo + * @return extendInfo + **/ + @javax.annotation.Nullable + public OpenNamespaceExtendDTO getExtendInfo() { + return extendInfo; + } + + + public void setExtendInfo(OpenNamespaceExtendDTO extendInfo) { + this.extendInfo = extendInfo; + } + + @Override public boolean equals(Object o) { @@ -361,12 +387,13 @@ public boolean equals(Object o) { Objects.equals(this.comment, openNamespaceDTO.comment) && Objects.equals(this.format, openNamespaceDTO.format) && Objects.equals(this.isPublic, openNamespaceDTO.isPublic) && - Objects.equals(this.items, openNamespaceDTO.items); + Objects.equals(this.items, openNamespaceDTO.items) && + Objects.equals(this.extendInfo, openNamespaceDTO.extendInfo); } @Override public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items); + return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items, extendInfo); } @Override @@ -384,6 +411,7 @@ public String toString() { 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(" extendInfo: ").append(toIndentedString(extendInfo)).append("\n"); sb.append("}"); return sb.toString(); } @@ -417,6 +445,7 @@ private String toIndentedString(Object o) { openapiFields.add("format"); openapiFields.add("isPublic"); openapiFields.add("items"); + openapiFields.add("extendInfo"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -483,6 +512,10 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { }; } } + // validate the optional field `extendInfo` + if (jsonObj.get("extendInfo") != null && !jsonObj.get("extendInfo").isJsonNull()) { + OpenNamespaceExtendDTO.validateJsonObject(jsonObj.getAsJsonObject("extendInfo")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java similarity index 54% rename from java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java rename to java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java index 871c708..4415fa2 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffs.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java @@ -21,8 +21,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import org.openapitools.client.model.OpenItemChangeSets; -import org.openapitools.client.model.OpenNamespaceIdentifier; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -50,85 +48,85 @@ import org.openapitools.client.JSON; /** - * OpenItemDiffs + * OpenNamespaceExtendDTO */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenItemDiffs { - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - private OpenNamespaceIdentifier namespace; +public class OpenNamespaceExtendDTO { + public static final String SERIALIZED_NAME_IS_CONFIG_HIDDEN = "isConfigHidden"; + @SerializedName(SERIALIZED_NAME_IS_CONFIG_HIDDEN) + private Boolean isConfigHidden; - public static final String SERIALIZED_NAME_DIFFS = "diffs"; - @SerializedName(SERIALIZED_NAME_DIFFS) - private OpenItemChangeSets diffs; + public static final String SERIALIZED_NAME_PARENT_APP_ID = "parentAppId"; + @SerializedName(SERIALIZED_NAME_PARENT_APP_ID) + private String parentAppId; - public static final String SERIALIZED_NAME_EXT_INFO = "extInfo"; - @SerializedName(SERIALIZED_NAME_EXT_INFO) - private String extInfo; + public static final String SERIALIZED_NAME_ITEM_MODIFIED_CNT = "itemModifiedCnt"; + @SerializedName(SERIALIZED_NAME_ITEM_MODIFIED_CNT) + private Integer itemModifiedCnt; - public OpenItemDiffs() { + public OpenNamespaceExtendDTO() { } - public OpenItemDiffs namespace(OpenNamespaceIdentifier namespace) { + public OpenNamespaceExtendDTO isConfigHidden(Boolean isConfigHidden) { - this.namespace = namespace; + this.isConfigHidden = isConfigHidden; return this; } /** - * Get namespace - * @return namespace + * 当当前用户无权限查看配置时置为 true + * @return isConfigHidden **/ @javax.annotation.Nullable - public OpenNamespaceIdentifier getNamespace() { - return namespace; + public Boolean getIsConfigHidden() { + return isConfigHidden; } - public void setNamespace(OpenNamespaceIdentifier namespace) { - this.namespace = namespace; + public void setIsConfigHidden(Boolean isConfigHidden) { + this.isConfigHidden = isConfigHidden; } - public OpenItemDiffs diffs(OpenItemChangeSets diffs) { + public OpenNamespaceExtendDTO parentAppId(String parentAppId) { - this.diffs = diffs; + this.parentAppId = parentAppId; return this; } /** - * Get diffs - * @return diffs + * 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + * @return parentAppId **/ @javax.annotation.Nullable - public OpenItemChangeSets getDiffs() { - return diffs; + public String getParentAppId() { + return parentAppId; } - public void setDiffs(OpenItemChangeSets diffs) { - this.diffs = diffs; + public void setParentAppId(String parentAppId) { + this.parentAppId = parentAppId; } - public OpenItemDiffs extInfo(String extInfo) { + public OpenNamespaceExtendDTO itemModifiedCnt(Integer itemModifiedCnt) { - this.extInfo = extInfo; + this.itemModifiedCnt = itemModifiedCnt; return this; } /** - * 扩展信息 - * @return extInfo + * 未发布变更数 + * @return itemModifiedCnt **/ @javax.annotation.Nullable - public String getExtInfo() { - return extInfo; + public Integer getItemModifiedCnt() { + return itemModifiedCnt; } - public void setExtInfo(String extInfo) { - this.extInfo = extInfo; + public void setItemModifiedCnt(Integer itemModifiedCnt) { + this.itemModifiedCnt = itemModifiedCnt; } @@ -141,24 +139,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenItemDiffs openItemDiffs = (OpenItemDiffs) o; - return Objects.equals(this.namespace, openItemDiffs.namespace) && - Objects.equals(this.diffs, openItemDiffs.diffs) && - Objects.equals(this.extInfo, openItemDiffs.extInfo); + OpenNamespaceExtendDTO openNamespaceExtendDTO = (OpenNamespaceExtendDTO) o; + return Objects.equals(this.isConfigHidden, openNamespaceExtendDTO.isConfigHidden) && + Objects.equals(this.parentAppId, openNamespaceExtendDTO.parentAppId) && + Objects.equals(this.itemModifiedCnt, openNamespaceExtendDTO.itemModifiedCnt); } @Override public int hashCode() { - return Objects.hash(namespace, diffs, extInfo); + return Objects.hash(isConfigHidden, parentAppId, itemModifiedCnt); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - 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"); + sb.append("class OpenNamespaceExtendDTO {\n"); + sb.append(" isConfigHidden: ").append(toIndentedString(isConfigHidden)).append("\n"); + sb.append(" parentAppId: ").append(toIndentedString(parentAppId)).append("\n"); + sb.append(" itemModifiedCnt: ").append(toIndentedString(itemModifiedCnt)).append("\n"); sb.append("}"); return sb.toString(); } @@ -181,9 +179,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("namespace"); - openapiFields.add("diffs"); - openapiFields.add("extInfo"); + openapiFields.add("isConfigHidden"); + openapiFields.add("parentAppId"); + openapiFields.add("itemModifiedCnt"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -193,32 +191,24 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenItemDiffs + * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceExtendDTO */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!OpenItemDiffs.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemDiffs is not found in the empty JSON string", OpenItemDiffs.openapiRequiredFields.toString())); + if (!OpenNamespaceExtendDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceExtendDTO is not found in the empty JSON string", OpenNamespaceExtendDTO.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!OpenItemDiffs.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDiffs` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!OpenNamespaceExtendDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceExtendDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - // validate the optional field `namespace` - if (jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) { - OpenNamespaceIdentifier.validateJsonObject(jsonObj.getAsJsonObject("namespace")); - } - // validate the optional field `diffs` - if (jsonObj.get("diffs") != null && !jsonObj.get("diffs").isJsonNull()) { - OpenItemChangeSets.validateJsonObject(jsonObj.getAsJsonObject("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())); + if ((jsonObj.get("parentAppId") != null && !jsonObj.get("parentAppId").isJsonNull()) && !jsonObj.get("parentAppId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `parentAppId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentAppId").toString())); } } @@ -226,22 +216,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenItemDiffs.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenItemDiffs' and its subtypes + if (!OpenNamespaceExtendDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenNamespaceExtendDTO' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenItemDiffs.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceExtendDTO.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, OpenItemDiffs value) throws IOException { + public void write(JsonWriter out, OpenNamespaceExtendDTO value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public OpenItemDiffs read(JsonReader in) throws IOException { + public OpenNamespaceExtendDTO read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -252,18 +242,18 @@ public OpenItemDiffs read(JsonReader in) throws IOException { } /** - * Create an instance of OpenItemDiffs given an JSON string + * Create an instance of OpenNamespaceExtendDTO given an JSON string * * @param jsonString JSON string - * @return An instance of OpenItemDiffs - * @throws IOException if the JSON string is invalid with respect to OpenItemDiffs + * @return An instance of OpenNamespaceExtendDTO + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceExtendDTO */ - public static OpenItemDiffs fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenItemDiffs.class); + public static OpenNamespaceExtendDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenNamespaceExtendDTO.class); } /** - * Convert an instance of OpenItemDiffs to an JSON string + * Convert an instance of OpenNamespaceExtendDTO to an JSON string * * @return JSON string */ 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 index 5ca9ce4..6db4fa2 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java @@ -64,6 +64,10 @@ public class OpenNamespaceLockDTO { @SerializedName(SERIALIZED_NAME_LOCKED_BY) private String lockedBy; + public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH_ALLOWED = "isEmergencyPublishAllowed"; + @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH_ALLOWED) + private Boolean isEmergencyPublishAllowed; + public OpenNamespaceLockDTO() { } @@ -130,6 +134,27 @@ public void setLockedBy(String lockedBy) { } + public OpenNamespaceLockDTO isEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { + + this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; + return this; + } + + /** + * 是否允许紧急发布 + * @return isEmergencyPublishAllowed + **/ + @javax.annotation.Nullable + public Boolean getIsEmergencyPublishAllowed() { + return isEmergencyPublishAllowed; + } + + + public void setIsEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { + this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; + } + + @Override public boolean equals(Object o) { @@ -142,12 +167,13 @@ public boolean equals(Object o) { OpenNamespaceLockDTO openNamespaceLockDTO = (OpenNamespaceLockDTO) o; return Objects.equals(this.namespaceName, openNamespaceLockDTO.namespaceName) && Objects.equals(this.isLocked, openNamespaceLockDTO.isLocked) && - Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy); + Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy) && + Objects.equals(this.isEmergencyPublishAllowed, openNamespaceLockDTO.isEmergencyPublishAllowed); } @Override public int hashCode() { - return Objects.hash(namespaceName, isLocked, lockedBy); + return Objects.hash(namespaceName, isLocked, lockedBy, isEmergencyPublishAllowed); } @Override @@ -157,6 +183,7 @@ public String toString() { 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(" isEmergencyPublishAllowed: ").append(toIndentedString(isEmergencyPublishAllowed)).append("\n"); sb.append("}"); return sb.toString(); } @@ -182,6 +209,7 @@ private String toIndentedString(Object o) { openapiFields.add("namespaceName"); openapiFields.add("isLocked"); openapiFields.add("lockedBy"); + openapiFields.add("isEmergencyPublishAllowed"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java similarity index 81% rename from java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java rename to java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java index b81606e..3536c17 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncModel.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java @@ -52,10 +52,10 @@ import org.openapitools.client.JSON; /** - * OpenNamespaceSyncModel + * OpenNamespaceSyncDTO */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceSyncModel { +public class OpenNamespaceSyncDTO { public static final String SERIALIZED_NAME_SYNC_TO_NAMESPACES = "syncToNamespaces"; @SerializedName(SERIALIZED_NAME_SYNC_TO_NAMESPACES) private List syncToNamespaces; @@ -64,16 +64,16 @@ public class OpenNamespaceSyncModel { @SerializedName(SERIALIZED_NAME_SYNC_ITEMS) private List syncItems; - public OpenNamespaceSyncModel() { + public OpenNamespaceSyncDTO() { } - public OpenNamespaceSyncModel syncToNamespaces(List syncToNamespaces) { + public OpenNamespaceSyncDTO syncToNamespaces(List syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; return this; } - public OpenNamespaceSyncModel addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { + public OpenNamespaceSyncDTO addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { if (this.syncToNamespaces == null) { this.syncToNamespaces = new ArrayList<>(); } @@ -96,13 +96,13 @@ public void setSyncToNamespaces(List syncToNamespaces) } - public OpenNamespaceSyncModel syncItems(List syncItems) { + public OpenNamespaceSyncDTO syncItems(List syncItems) { this.syncItems = syncItems; return this; } - public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { + public OpenNamespaceSyncDTO addSyncItemsItem(OpenItemDTO syncItemsItem) { if (this.syncItems == null) { this.syncItems = new ArrayList<>(); } @@ -111,7 +111,7 @@ public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { } /** - * 需要同步的配置项列表 + * 需要修改的配置项列表 * @return syncItems **/ @javax.annotation.Nullable @@ -134,9 +134,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenNamespaceSyncModel openNamespaceSyncModel = (OpenNamespaceSyncModel) o; - return Objects.equals(this.syncToNamespaces, openNamespaceSyncModel.syncToNamespaces) && - Objects.equals(this.syncItems, openNamespaceSyncModel.syncItems); + OpenNamespaceSyncDTO openNamespaceSyncDTO = (OpenNamespaceSyncDTO) o; + return Objects.equals(this.syncToNamespaces, openNamespaceSyncDTO.syncToNamespaces) && + Objects.equals(this.syncItems, openNamespaceSyncDTO.syncItems); } @Override @@ -147,7 +147,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceSyncModel {\n"); + sb.append("class OpenNamespaceSyncDTO {\n"); sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); sb.append("}"); @@ -183,20 +183,20 @@ private String toIndentedString(Object o) { * Validates the JSON Object and throws an exception if issues found * * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceSyncModel + * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceSyncDTO */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!OpenNamespaceSyncModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceSyncModel is not found in the empty JSON string", OpenNamespaceSyncModel.openapiRequiredFields.toString())); + if (!OpenNamespaceSyncDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceSyncDTO is not found in the empty JSON string", OpenNamespaceSyncDTO.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!OpenNamespaceSyncModel.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceSyncModel` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!OpenNamespaceSyncDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceSyncDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } if (jsonObj.get("syncToNamespaces") != null && !jsonObj.get("syncToNamespaces").isJsonNull()) { @@ -233,22 +233,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceSyncModel.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceSyncModel' and its subtypes + if (!OpenNamespaceSyncDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenNamespaceSyncDTO' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceSyncModel.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceSyncDTO.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, OpenNamespaceSyncModel value) throws IOException { + public void write(JsonWriter out, OpenNamespaceSyncDTO value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public OpenNamespaceSyncModel read(JsonReader in) throws IOException { + public OpenNamespaceSyncDTO read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -259,18 +259,18 @@ public OpenNamespaceSyncModel read(JsonReader in) throws IOException { } /** - * Create an instance of OpenNamespaceSyncModel given an JSON string + * Create an instance of OpenNamespaceSyncDTO given an JSON string * * @param jsonString JSON string - * @return An instance of OpenNamespaceSyncModel - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceSyncModel + * @return An instance of OpenNamespaceSyncDTO + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceSyncDTO */ - public static OpenNamespaceSyncModel fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceSyncModel.class); + public static OpenNamespaceSyncDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenNamespaceSyncDTO.class); } /** - * Convert an instance of OpenNamespaceSyncModel to an JSON string + * Convert an instance of OpenNamespaceSyncDTO to an JSON string * * @return JSON string */ diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java new file mode 100644 index 0000000..ec688d5 --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java @@ -0,0 +1,384 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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 java.util.Arrays; +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 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.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.openapitools.client.JSON; + +/** + * 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OpenNamespaceUsageDTO { + public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; + @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) + private String namespaceName; + + public static final String SERIALIZED_NAME_APP_ID = "appId"; + @SerializedName(SERIALIZED_NAME_APP_ID) + private String appId; + + public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; + @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) + private String clusterName; + + public static final String SERIALIZED_NAME_ENV_NAME = "envName"; + @SerializedName(SERIALIZED_NAME_ENV_NAME) + private String envName; + + public static final String SERIALIZED_NAME_INSTANCE_COUNT = "instanceCount"; + @SerializedName(SERIALIZED_NAME_INSTANCE_COUNT) + private Integer instanceCount; + + public static final String SERIALIZED_NAME_BRANCH_INSTANCE_COUNT = "branchInstanceCount"; + @SerializedName(SERIALIZED_NAME_BRANCH_INSTANCE_COUNT) + private Integer branchInstanceCount; + + public static final String SERIALIZED_NAME_LINKED_NAMESPACE_COUNT = "linkedNamespaceCount"; + @SerializedName(SERIALIZED_NAME_LINKED_NAMESPACE_COUNT) + private Integer linkedNamespaceCount; + + public OpenNamespaceUsageDTO() { + } + + public OpenNamespaceUsageDTO namespaceName(String namespaceName) { + + this.namespaceName = namespaceName; + return this; + } + + /** + * 命名空间名称 + * @return namespaceName + **/ + @javax.annotation.Nullable + public String getNamespaceName() { + return namespaceName; + } + + + public void setNamespaceName(String namespaceName) { + this.namespaceName = namespaceName; + } + + + public OpenNamespaceUsageDTO appId(String appId) { + + this.appId = appId; + return this; + } + + /** + * 所属应用的唯一标识符 + * @return appId + **/ + @javax.annotation.Nullable + public String getAppId() { + return appId; + } + + + public void setAppId(String appId) { + this.appId = appId; + } + + + public OpenNamespaceUsageDTO clusterName(String clusterName) { + + this.clusterName = clusterName; + return this; + } + + /** + * 所属集群名称 + * @return clusterName + **/ + @javax.annotation.Nullable + public String getClusterName() { + return clusterName; + } + + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + + public OpenNamespaceUsageDTO envName(String envName) { + + this.envName = envName; + return this; + } + + /** + * 环境名称 + * @return envName + **/ + @javax.annotation.Nullable + public String getEnvName() { + return envName; + } + + + public void setEnvName(String envName) { + this.envName = envName; + } + + + public OpenNamespaceUsageDTO instanceCount(Integer instanceCount) { + + this.instanceCount = instanceCount; + return this; + } + + /** + * 该命名空间关联的实例数量 + * @return instanceCount + **/ + @javax.annotation.Nullable + public Integer getInstanceCount() { + return instanceCount; + } + + + public void setInstanceCount(Integer instanceCount) { + this.instanceCount = instanceCount; + } + + + public OpenNamespaceUsageDTO branchInstanceCount(Integer branchInstanceCount) { + + this.branchInstanceCount = branchInstanceCount; + return this; + } + + /** + * 分支命名空间关联的实例数量 + * @return branchInstanceCount + **/ + @javax.annotation.Nullable + public Integer getBranchInstanceCount() { + return branchInstanceCount; + } + + + public void setBranchInstanceCount(Integer branchInstanceCount) { + this.branchInstanceCount = branchInstanceCount; + } + + + public OpenNamespaceUsageDTO linkedNamespaceCount(Integer linkedNamespaceCount) { + + this.linkedNamespaceCount = linkedNamespaceCount; + return this; + } + + /** + * 关联到该公共命名空间的命名空间数量 + * @return linkedNamespaceCount + **/ + @javax.annotation.Nullable + public Integer getLinkedNamespaceCount() { + return linkedNamespaceCount; + } + + + public void setLinkedNamespaceCount(Integer linkedNamespaceCount) { + this.linkedNamespaceCount = linkedNamespaceCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenNamespaceUsageDTO openNamespaceUsageDTO = (OpenNamespaceUsageDTO) o; + return Objects.equals(this.namespaceName, openNamespaceUsageDTO.namespaceName) && + Objects.equals(this.appId, openNamespaceUsageDTO.appId) && + Objects.equals(this.clusterName, openNamespaceUsageDTO.clusterName) && + Objects.equals(this.envName, openNamespaceUsageDTO.envName) && + Objects.equals(this.instanceCount, openNamespaceUsageDTO.instanceCount) && + Objects.equals(this.branchInstanceCount, openNamespaceUsageDTO.branchInstanceCount) && + Objects.equals(this.linkedNamespaceCount, openNamespaceUsageDTO.linkedNamespaceCount); + } + + @Override + public int hashCode() { + return Objects.hash(namespaceName, appId, clusterName, envName, instanceCount, branchInstanceCount, linkedNamespaceCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenNamespaceUsageDTO {\n"); + sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); + sb.append(" instanceCount: ").append(toIndentedString(instanceCount)).append("\n"); + sb.append(" branchInstanceCount: ").append(toIndentedString(branchInstanceCount)).append("\n"); + sb.append(" linkedNamespaceCount: ").append(toIndentedString(linkedNamespaceCount)).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(); + openapiFields.add("namespaceName"); + openapiFields.add("appId"); + openapiFields.add("clusterName"); + openapiFields.add("envName"); + openapiFields.add("instanceCount"); + openapiFields.add("branchInstanceCount"); + openapiFields.add("linkedNamespaceCount"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Object and throws an exception if issues found + * + * @param jsonObj JSON Object + * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceUsageDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenNamespaceUsageDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceUsageDTO is not found in the empty JSON string", OpenNamespaceUsageDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OpenNamespaceUsageDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceUsageDTO` properties. JSON: %s", entry.getKey(), jsonObj.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("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("envName") != null && !jsonObj.get("envName").isJsonNull()) && !jsonObj.get("envName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `envName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("envName").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenNamespaceUsageDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenNamespaceUsageDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceUsageDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenNamespaceUsageDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenNamespaceUsageDTO read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpenNamespaceUsageDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenNamespaceUsageDTO + * @throws IOException if the JSON string is invalid with respect to OpenNamespaceUsageDTO + */ + public static OpenNamespaceUsageDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenNamespaceUsageDTO.class); + } + + /** + * Convert an instance of OpenNamespaceUsageDTO 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/RichResponseEntity.java b/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java deleted file mode 100644 index 0026920..0000000 --- a/java-client/src/main/java/org/openapitools/client/model/RichResponseEntity.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Apollo OpenAPI - *

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\"
- * - * 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 java.util.Arrays; -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 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.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * A wrapper for a single response entity with code, message, and body - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class RichResponseEntity { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private Object message; - - public static final String SERIALIZED_NAME_BODY = "body"; - @SerializedName(SERIALIZED_NAME_BODY) - private Object body; - - public RichResponseEntity() { - } - - public RichResponseEntity code(Integer code) { - - this.code = code; - return this; - } - - /** - * HTTP status code - * @return code - **/ - @javax.annotation.Nonnull - public Integer getCode() { - return code; - } - - - public void setCode(Integer code) { - this.code = code; - } - - - public RichResponseEntity message(Object message) { - - this.message = message; - return this; - } - - /** - * Response message (can be string or object) - * @return message - **/ - @javax.annotation.Nonnull - public Object getMessage() { - return message; - } - - - public void setMessage(Object message) { - this.message = message; - } - - - public RichResponseEntity body(Object body) { - - this.body = body; - return this; - } - - /** - * Response payload (generic type T) - * @return body - **/ - @javax.annotation.Nullable - public Object getBody() { - return body; - } - - - public void setBody(Object body) { - this.body = body; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RichResponseEntity richResponseEntity = (RichResponseEntity) o; - return Objects.equals(this.code, richResponseEntity.code) && - Objects.equals(this.message, richResponseEntity.message) && - Objects.equals(this.body, richResponseEntity.body); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, body); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RichResponseEntity {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).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(); - openapiFields.add("code"); - openapiFields.add("message"); - openapiFields.add("body"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("code"); - openapiRequiredFields.add("message"); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to RichResponseEntity - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!RichResponseEntity.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RichResponseEntity is not found in the empty JSON string", RichResponseEntity.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!RichResponseEntity.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `RichResponseEntity` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : RichResponseEntity.openapiRequiredFields) { - if (jsonObj.get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!RichResponseEntity.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'RichResponseEntity' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(RichResponseEntity.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, RichResponseEntity value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public RichResponseEntity read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of RichResponseEntity given an JSON string - * - * @param jsonString JSON string - * @return An instance of RichResponseEntity - * @throws IOException if the JSON string is invalid with respect to RichResponseEntity - */ - public static RichResponseEntity fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, RichResponseEntity.class); - } - - /** - * Convert an instance of RichResponseEntity 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 index 4f1d006..e7c3466 100644 --- a/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java @@ -168,7 +168,7 @@ public void getEnvClusterInfoTest() throws ApiException { /** * 获取应用的环境集群信息 (original openapi) * - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * * @throws ApiException if the Api call fails */ diff --git a/java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java new file mode 100644 index 0000000..db5b525 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java @@ -0,0 +1,144 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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.ExceptionResponse; +import org.openapitools.client.model.OpenAppNamespaceDTO; +import org.openapitools.client.model.OpenNamespaceDTO; +import org.openapitools.client.model.OpenNamespaceUsageDTO; +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 AppNamespaceManagementApi + */ +@Disabled +public class AppNamespaceManagementApiTest { + + private final AppNamespaceManagementApi api = new AppNamespaceManagementApi(); + + /** + * 创建AppNamespace (original openapi) + * + * POST /openapi/v1/apps/{appId}/appnamespaces + * + * @throws ApiException if the Api call fails + */ + @Test + public void createAppNamespaceTest() throws ApiException { + String appId = null; + OpenAppNamespaceDTO openAppNamespaceDTO = null; + String operator = null; + OpenAppNamespaceDTO response = api.createAppNamespace(appId, openAppNamespaceDTO, operator); + // TODO: test validations + } + + /** + * 删除AppNamespace (new added) + * + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteAppNamespaceTest() throws ApiException { + String appId = null; + String namespaceName = null; + String operator = null; + api.deleteAppNamespace(appId, namespaceName, operator); + // TODO: test validations + } + + /** + * 获取指定的AppNamespace (new added) + * + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @throws ApiException if the Api call fails + */ + @Test + public void findAppNamespaceTest() throws ApiException { + String appId = null; + String namespaceName = null; + Boolean extendInfo = null; + OpenAppNamespaceDTO response = api.findAppNamespace(appId, namespaceName, extendInfo); + // TODO: test validations + } + + /** + * 查询appnamespace使用情况(new added) + * + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * + * @throws ApiException if the Api call fails + */ + @Test + public void findAppNamespaceUsageTest() throws ApiException { + String appId = null; + String namespaceName = null; + List response = api.findAppNamespaceUsage(appId, namespaceName); + // TODO: test validations + } + + /** + * 获取所有公共AppNamespace (new added) + * + * GET /openapi/v1/appnamespaces/public + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAppNamespacesTest() throws ApiException { + List response = api.getAppNamespaces(); + // TODO: test validations + } + + /** + * 获取指定应用的AppNamespace (new added) + * + * GET /openapi/v1/apps/{appId}/appnamespaces + * + * @throws ApiException if the Api call fails + */ + @Test + public void getAppNamespacesByAppIdTest() throws ApiException { + String appId = null; + List response = api.getAppNamespacesByAppId(appId); + // TODO: test validations + } + + /** + * 获取公共AppNamespace的所有实例 (new added) + * + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * + * @throws ApiException if the Api call fails + */ + @Test + public void getPublicAppNamespaceInstancesTest() throws ApiException { + String env = null; + String publicNamespaceName = null; + Integer page = null; + Integer size = null; + List response = api.getPublicAppNamespaceInstances(env, publicNamespaceName, 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 index 0a4247f..892608a 100644 --- a/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java @@ -16,9 +16,9 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenItemDiffs; +import org.openapitools.client.model.OpenItemDiffDTO; import org.openapitools.client.model.OpenItemPageDTO; -import org.openapitools.client.model.OpenNamespaceSyncModel; +import org.openapitools.client.model.OpenNamespaceSyncDTO; import org.openapitools.client.model.OpenNamespaceTextModel; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -39,7 +39,7 @@ public class ItemManagementApiTest { /** * 通过文本批量修改配置项 (new added) * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * * @throws ApiException if the Api call fails */ @@ -49,16 +49,16 @@ public void batchUpdateItemsByTextTest() throws ApiException { String env = null; String clusterName = null; String namespaceName = null; - String operator = null; OpenNamespaceTextModel openNamespaceTextModel = null; - Object response = api.batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); + String operator = null; + api.batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); // TODO: test validations } /** * 对比命名空间配置差异 (new added) * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * * @throws ApiException if the Api call fails */ @@ -68,8 +68,8 @@ public void compareItemsTest() throws ApiException { String env = null; String clusterName = null; String namespaceName = null; - OpenNamespaceSyncModel openNamespaceSyncModel = null; - List response = api.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel); + OpenNamespaceSyncDTO openNamespaceSyncDTO = null; + List response = api.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); // TODO: test validations } @@ -86,9 +86,9 @@ public void createItemTest() throws ApiException { String env = null; String clusterName = null; String namespaceName = null; - String operator = null; OpenItemDTO openItemDTO = null; - OpenItemDTO response = api.createItem(appId, env, clusterName, namespaceName, operator, openItemDTO); + String operator = null; + OpenItemDTO response = api.createItem(appId, env, clusterName, namespaceName, openItemDTO, operator); // TODO: test validations } @@ -107,7 +107,7 @@ public void deleteItemTest() throws ApiException { String namespaceName = null; String key = null; String operator = null; - Object response = api.deleteItem(appId, env, clusterName, namespaceName, key, operator); + api.deleteItem(appId, env, clusterName, namespaceName, key, operator); // TODO: test validations } @@ -126,44 +126,44 @@ public void deleteItemByEncodedKeyTest() throws ApiException { String namespaceName = null; String key = null; String operator = null; - Object response = api.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); + api.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); // TODO: test validations } /** - * 获取命名空间下的配置项列表 (original openapi) + * 获取分支下的配置项 (new added) * - * 获取指定命名空间的配置项列表,支持分页 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * * @throws ApiException if the Api call fails */ @Test - public void findItemsByNamespaceTest() throws ApiException { + public void findBranchItemsTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - Integer page = null; - Integer size = null; - OpenItemPageDTO response = api.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); + String branchName = null; + List response = api.findBranchItems(appId, env, clusterName, namespaceName, branchName); // TODO: test validations } /** - * 获取分支下的配置项 (new added) + * 获取命名空间下的配置项列表 (original openapi) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取指定命名空间的配置项列表,支持分页 * * @throws ApiException if the Api call fails */ @Test - public void getBranchItemsTest() throws ApiException { + public void findItemsByNamespaceTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String branchName = null; - List response = api.getBranchItems(appId, env, clusterName, namespaceName, branchName); + Integer page = null; + Integer size = null; + OpenItemPageDTO response = api.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); // TODO: test validations } @@ -206,7 +206,7 @@ public void getItemByEncodedKeyTest() throws ApiException { /** * 撤销配置项更改 (new added) * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * * @throws ApiException if the Api call fails */ @@ -217,14 +217,14 @@ public void revertItemsTest() throws ApiException { String clusterName = null; String namespaceName = null; String operator = null; - Object response = api.revertItems(appId, env, clusterName, namespaceName, operator); + api.revertItems(appId, env, clusterName, namespaceName, operator); // TODO: test validations } /** * 同步配置项到多个命名空间 (new added) * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * * @throws ApiException if the Api call fails */ @@ -234,41 +234,39 @@ public void syncItemsTest() throws ApiException { String env = null; String clusterName = null; String namespaceName = null; + OpenNamespaceSyncDTO openNamespaceSyncDTO = null; String operator = null; - OpenNamespaceSyncModel openNamespaceSyncModel = null; - Object response = api.syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); + api.syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); // TODO: test validations } /** - * 更新配置项 (original openapi) + * 验证配置文本语法 (new added) * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation * * @throws ApiException if the Api call fails */ @Test - public void updateItemTest() throws ApiException { + public void syntaxCheckTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - String key = null; - Boolean createIfNotExists = null; - OpenItemDTO openItemDTO = null; - Object response = api.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + OpenNamespaceTextModel openNamespaceTextModel = null; + api.syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel); // TODO: test validations } /** - * 通过编码的key更新配置项 (original openapi) + * 更新配置项 (original openapi) * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * * @throws ApiException if the Api call fails */ @Test - public void updateItemByEncodedKeyTest() throws ApiException { + public void updateItemTest() throws ApiException { String appId = null; String env = null; String clusterName = null; @@ -276,25 +274,29 @@ public void updateItemByEncodedKeyTest() throws ApiException { String key = null; Boolean createIfNotExists = null; OpenItemDTO openItemDTO = null; - Object response = api.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + String operator = null; + api.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); // TODO: test validations } /** - * 验证配置文本语法 (new added) + * 通过编码的key更新配置项 (original openapi) * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * * @throws ApiException if the Api call fails */ @Test - public void validateItemsTest() throws ApiException { + public void updateItemByEncodedKeyTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenNamespaceTextModel openNamespaceTextModel = null; - Object response = api.validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); + String key = null; + Boolean createIfNotExists = null; + OpenItemDTO openItemDTO = null; + String operator = null; + api.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); // 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 index fddf92a..a03c7dc 100644 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java @@ -68,7 +68,7 @@ public void deleteBranchTest() throws ApiException { String namespaceName = null; String branchName = null; String operator = null; - Object response = api.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); + api.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); // TODO: test validations } @@ -85,7 +85,8 @@ public void findBranchTest() throws ApiException { String env = null; String clusterName = null; String namespaceName = null; - OpenNamespaceDTO response = api.findBranch(appId, env, clusterName, namespaceName); + Boolean extendInfo = null; + OpenNamespaceDTO response = api.findBranch(appId, env, clusterName, namespaceName, extendInfo); // TODO: test validations } @@ -107,10 +108,30 @@ public void getBranchGrayRulesTest() throws ApiException { // TODO: test validations } + /** + * 合并分支 (original openapi) + * + * 合并灰度分支并可选择删除分支 + * + * @throws ApiException if the Api call fails + */ + @Test + public void mergeTest() 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.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + // TODO: test validations + } + /** * 合并分支到主分支 (new added) * - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * * @throws ApiException if the Api call fails */ @@ -122,9 +143,9 @@ public void mergeBranchTest() throws ApiException { String namespaceName = null; String branchName = null; Boolean deleteBranch = null; - String operator = null; NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); + String operator = null; + OpenReleaseDTO response = api.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); // TODO: test validations } @@ -144,7 +165,7 @@ public void updateBranchRulesTest() throws ApiException { String branchName = null; String operator = null; OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = null; - Object response = api.updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); + api.updateBranchRules(appId, env, clusterName, namespaceName, branchName, operator, openGrayReleaseRuleDTO); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java new file mode 100644 index 0000000..ed886c0 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java @@ -0,0 +1,51 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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.OpenNamespaceLockDTO; +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 NamespaceLockManagementApi + */ +@Disabled +public class NamespaceLockManagementApiTest { + + private final NamespaceLockManagementApi api = new NamespaceLockManagementApi(); + + /** + * 获取Namespace的锁状态 (original openapi) + * + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNamespaceLockTest() throws ApiException { + String appId = null; + String env = null; + String clusterName = null; + String namespaceName = null; + OpenNamespaceLockDTO response = api.getNamespaceLock(appId, env, clusterName, namespaceName); + // 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 index e4aa526..127aabc 100644 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java @@ -14,10 +14,9 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenAppNamespaceDTO; +import org.openapitools.client.model.OpenCreateNamespaceDTO; import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceLockDTO; +import org.openapitools.client.model.OpenNamespaceUsageDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -35,210 +34,154 @@ public class NamespaceManagementApiTest { private final NamespaceManagementApi api = new NamespaceManagementApi(); /** - * 检查缺失的Namespace (new added) + * 创建缺失的Namespace (new added) * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * * @throws ApiException if the Api call fails */ @Test - public void checkNamespaceIntegrityTest() throws ApiException { + public void createMissingNamespacesTest() throws ApiException { String appId = null; String env = null; String clusterName = null; - List response = api.checkNamespaceIntegrity(appId, env, clusterName); - // TODO: test validations - } - - /** - * 创建AppNamespace (original openapi) - * - * POST /openapi/v1/apps/{appId}/appnamespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void createNamespaceTest() throws ApiException { - String appId = null; - OpenAppNamespaceDTO openAppNamespaceDTO = null; - OpenAppNamespaceDTO response = api.createNamespace(appId, openAppNamespaceDTO); + String operator = null; + Object response = api.createMissingNamespaces(appId, env, clusterName, operator); // TODO: test validations } /** - * 删除AppNamespace (new added) + * 创建Namespace (new added) * - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * POST /openapi/v1/apps/{appId}/namespaces * * @throws ApiException if the Api call fails */ @Test - public void deleteAppNamespaceTest() throws ApiException { - String appId = null; - String namespaceName = null; + public void createNamespacesTest() throws ApiException { + List openCreateNamespaceDTO = null; String operator = null; - Object response = api.deleteAppNamespace(appId, namespaceName, operator); + api.createNamespaces(openCreateNamespaceDTO, operator); // TODO: test validations } /** - * 删除关联的Namespace (new added) + * 删除指定的Namespace (new added) * - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} * * @throws ApiException if the Api call fails */ @Test - public void deleteNamespaceLinksTest() throws ApiException { + public void deleteNamespaceTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; String operator = null; - Object response = api.deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator); + api.deleteNamespace(appId, env, clusterName, namespaceName, operator); // TODO: test validations } /** - * 获取指定集群下的所有Namespace (original openapi) + * 查找缺失的Namespace (new added) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * * @throws ApiException if the Api call fails */ @Test - public void findNamespacesTest() throws ApiException { + public void findMissingNamespacesTest() throws ApiException { String appId = null; String env = null; String clusterName = null; - Boolean fillItemDetail = null; - List response = api.findNamespaces(appId, env, clusterName, fillItemDetail); + List response = api.findMissingNamespaces(appId, env, clusterName); // TODO: test validations } /** - * 获取指定的AppNamespace (new added) + * 获取指定的Namespace (original openapi) * - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} * * @throws ApiException if the Api call fails */ @Test - public void getAppNamespaceTest() throws ApiException { + public void findNamespaceTest() throws ApiException { String appId = null; + String env = null; + String clusterName = null; String namespaceName = null; - OpenAppNamespaceDTO response = api.getAppNamespace(appId, namespaceName); - // TODO: test validations - } - - /** - * 获取所有公共AppNamespace (new added) - * - * GET /openapi/v1/appnamespaces?public=true - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppNamespacesTest() throws ApiException { - Boolean publicOnly = null; - List response = api.getAppNamespaces(publicOnly); - // TODO: test validations - } - - /** - * 获取指定应用的AppNamespace (new added) - * - * GET /openapi/v1/apps/{appId}/appnamespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppNamespacesByAppTest() throws ApiException { - String appId = null; - List response = api.getAppNamespacesByApp(appId); + Boolean fillItemDetail = null; + Boolean extendInfo = null; + OpenNamespaceDTO response = api.findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); // TODO: test validations } /** - * 获取Namespace的锁状态 (original openapi) + * 查询namespace使用情况(new added) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage * * @throws ApiException if the Api call fails */ @Test - public void getNamespaceLockTest() throws ApiException { + public void findNamespaceUsageTest() throws ApiException { String appId = null; String env = null; String clusterName = null; String namespaceName = null; - OpenNamespaceLockDTO response = api.getNamespaceLock(appId, env, clusterName, namespaceName); + List response = api.findNamespaceUsage(appId, env, clusterName, namespaceName); // TODO: test validations } /** - * 获取应用下所有Namespace的发布状态 (new added) + * 获取指定集群下的所有Namespace (original openapi) * - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces * * @throws ApiException if the Api call fails */ @Test - public void getNamespacesReleaseStatusTest() throws ApiException { + public void findNamespacesTest() throws ApiException { String appId = null; - Map> response = api.getNamespacesReleaseStatus(appId); - // TODO: test validations - } - - /** - * 获取公共AppNamespace的所有实例 (new added) - * - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * - * @throws ApiException if the Api call fails - */ - @Test - public void getPublicAppNamespaceInstancesTest() throws ApiException { String env = null; - String publicNamespaceName = null; - Integer page = null; - Integer size = null; - List response = api.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); + String clusterName = null; + Boolean fillItemDetail = null; + Boolean extendInfo = null; + List response = api.findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo); // TODO: test validations } /** - * 获取关联的公共Namespace (new added) + * 查询关联Namespace对应的公共Namespace详情 (new added) * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace * * @throws ApiException if the Api call fails */ @Test - public void getPublicNamespaceAssociationTest() throws ApiException { - String appId = null; + public void findPublicNamespaceForAssociatedNamespaceTest() throws ApiException { String env = null; + String appId = null; String clusterName = null; String namespaceName = null; - OpenNamespaceDTO response = api.getPublicNamespaceAssociation(appId, env, clusterName, namespaceName); + Boolean extendInfo = null; + OpenNamespaceDTO response = api.findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo); // TODO: test validations } /** - * 获取指定的Namespace (original openapi) + * 获取应用下所有Namespace的发布状态 (new added) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * GET /openapi/v1/apps/{appId}/namespaces/releases/status * * @throws ApiException if the Api call fails */ @Test - public void loadNamespaceTest() throws ApiException { + public void getNamespacesReleaseStatusTest() throws ApiException { String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Boolean fillItemDetail = null; - OpenNamespaceDTO response = api.loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail); + Map> response = api.getNamespacesReleaseStatus(appId); // 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 index 705f1be..1c6278a 100644 --- a/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java @@ -161,26 +161,6 @@ public void loadLatestActiveReleaseTest() throws ApiException { // TODO: test validations } - /** - * 合并分支 (original openapi) - * - * 合并灰度分支并可选择删除分支 - * - * @throws ApiException if the Api call fails - */ - @Test - public void mergeTest() 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.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - // TODO: test validations - } - /** * 回滚发布 (original openapi) * diff --git a/java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateItemDTOTest.java similarity index 68% rename from java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenCreateItemDTOTest.java index f63ee0a..220a610 100644 --- a/java-client/src/test/java/org/openapitools/client/model/RichResponseEntityTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenCreateItemDTOTest.java @@ -24,41 +24,49 @@ /** - * Model tests for RichResponseEntity + * Model tests for OpenCreateItemDTO */ -public class RichResponseEntityTest { - private final RichResponseEntity model = new RichResponseEntity(); +public class OpenCreateItemDTOTest { + private final OpenCreateItemDTO model = new OpenCreateItemDTO(); /** - * Model tests for RichResponseEntity + * Model tests for OpenCreateItemDTO */ @Test - public void testRichResponseEntity() { - // TODO: test RichResponseEntity + public void testOpenCreateItemDTO() { + // TODO: test OpenCreateItemDTO } /** - * Test the property 'code' + * Test the property 'key' */ @Test - public void codeTest() { - // TODO: test code + public void keyTest() { + // TODO: test key } /** - * Test the property 'message' + * Test the property 'type' */ @Test - public void messageTest() { - // TODO: test message + public void typeTest() { + // TODO: test type } /** - * Test the property 'body' + * Test the property 'value' */ @Test - public void bodyTest() { - // TODO: test body + 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/MultiResponseEntityTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java similarity index 64% rename from java-client/src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java index 638bc48..e5acf2b 100644 --- a/java-client/src/test/java/org/openapitools/client/model/MultiResponseEntityTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java @@ -19,41 +19,54 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.RichResponseEntity; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for MultiResponseEntity + * Model tests for OpenCreateNamespaceDTO */ -public class MultiResponseEntityTest { - private final MultiResponseEntity model = new MultiResponseEntity(); +public class OpenCreateNamespaceDTOTest { + private final OpenCreateNamespaceDTO model = new OpenCreateNamespaceDTO(); /** - * Model tests for MultiResponseEntity + * Model tests for OpenCreateNamespaceDTO */ @Test - public void testMultiResponseEntity() { - // TODO: test MultiResponseEntity + public void testOpenCreateNamespaceDTO() { + // TODO: test OpenCreateNamespaceDTO } /** - * Test the property 'code' + * Test the property 'appId' */ @Test - public void codeTest() { - // TODO: test code + public void appIdTest() { + // TODO: test appId } /** - * Test the property 'entities' + * Test the property 'env' */ @Test - public void entitiesTest() { - // TODO: test entities + public void envTest() { + // TODO: test env + } + + /** + * Test the property 'clusterName' + */ + @Test + public void clusterNameTest() { + // TODO: test clusterName + } + + /** + * Test the property 'appNamespaceName' + */ + @Test + public void appNamespaceNameTest() { + // TODO: test appNamespaceName } } 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 index d844ff8..04873c1 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java @@ -19,8 +19,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; +import java.util.LinkedHashSet; +import java.util.Set; import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; 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 index 82ddd38..655d4a7 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java @@ -19,8 +19,8 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; +import java.util.LinkedHashSet; +import java.util.Set; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; 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 index 5ca8aab..4d131a0 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java @@ -19,6 +19,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import org.openapitools.client.model.OpenItemExtendDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -38,67 +39,75 @@ public void testOpenItemDTO() { } /** - * Test the property 'dataChangeCreatedBy' + * Test the property 'key' */ @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy + public void keyTest() { + // TODO: test key } /** - * Test the property 'dataChangeLastModifiedBy' + * Test the property 'value' */ @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy + public void valueTest() { + // TODO: test value } /** - * Test the property 'dataChangeCreatedTime' + * Test the property 'type' */ @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime + public void typeTest() { + // TODO: test type } /** - * Test the property 'dataChangeLastModifiedTime' + * Test the property 'comment' */ @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime + public void commentTest() { + // TODO: test comment } /** - * Test the property 'key' + * Test the property 'extendInfo' */ @Test - public void keyTest() { - // TODO: test key + public void extendInfoTest() { + // TODO: test extendInfo } /** - * Test the property 'type' + * Test the property 'dataChangeCreatedBy' */ @Test - public void typeTest() { - // TODO: test type + public void dataChangeCreatedByTest() { + // TODO: test dataChangeCreatedBy } /** - * Test the property 'value' + * Test the property 'dataChangeLastModifiedBy' */ @Test - public void valueTest() { - // TODO: test value + public void dataChangeLastModifiedByTest() { + // TODO: test dataChangeLastModifiedBy } /** - * Test the property 'comment' + * Test the property 'dataChangeCreatedTime' */ @Test - public void commentTest() { - // TODO: test comment + public void dataChangeCreatedTimeTest() { + // TODO: test dataChangeCreatedTime + } + + /** + * Test the property 'dataChangeLastModifiedTime' + */ + @Test + public void dataChangeLastModifiedTimeTest() { + // TODO: test dataChangeLastModifiedTime } } diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java new file mode 100644 index 0000000..86bd168 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java @@ -0,0 +1,92 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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.List; +import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenNamespaceIdentifier; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenItemDiffDTO + */ +public class OpenItemDiffDTOTest { + private final OpenItemDiffDTO model = new OpenItemDiffDTO(); + + /** + * Model tests for OpenItemDiffDTO + */ + @Test + public void testOpenItemDiffDTO() { + // TODO: test OpenItemDiffDTO + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'namespace' + */ + @Test + public void namespaceTest() { + // TODO: test namespace + } + + /** + * Test the property 'createItems' + */ + @Test + public void createItemsTest() { + // TODO: test createItems + } + + /** + * Test the property 'deleteItems' + */ + @Test + public void deleteItemsTest() { + // TODO: test deleteItems + } + + /** + * Test the property 'updateItems' + */ + @Test + public void updateItemsTest() { + // TODO: test updateItems + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java new file mode 100644 index 0000000..758a0a4 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java @@ -0,0 +1,88 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenItemExtendDTO + */ +public class OpenItemExtendDTOTest { + private final OpenItemExtendDTO model = new OpenItemExtendDTO(); + + /** + * Model tests for OpenItemExtendDTO + */ + @Test + public void testOpenItemExtendDTO() { + // TODO: test OpenItemExtendDTO + } + + /** + * Test the property 'namespaceId' + */ + @Test + public void namespaceIdTest() { + // TODO: test namespaceId + } + + /** + * Test the property 'isModified' + */ + @Test + public void isModifiedTest() { + // TODO: test isModified + } + + /** + * Test the property 'isDeleted' + */ + @Test + public void isDeletedTest() { + // TODO: test isDeleted + } + + /** + * Test the property 'isNewlyAdded' + */ + @Test + public void isNewlyAddedTest() { + // TODO: test isNewlyAdded + } + + /** + * Test the property 'newValue' + */ + @Test + public void newValueTest() { + // TODO: test newValue + } + + /** + * Test the property 'oldValue' + */ + @Test + public void oldValueTest() { + // TODO: test oldValue + } + +} 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 index 8e49a84..9e78526 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import org.openapitools.client.model.OpenItemDTO; +import org.openapitools.client.model.OpenNamespaceExtendDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -128,4 +129,12 @@ public void itemsTest() { // TODO: test items } + /** + * Test the property 'extendInfo' + */ + @Test + public void extendInfoTest() { + // TODO: test extendInfo + } + } diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java similarity index 69% rename from java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java index b19fb10..b4829fd 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffsTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java @@ -19,48 +19,46 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; -import org.openapitools.client.model.OpenItemChangeSets; -import org.openapitools.client.model.OpenNamespaceIdentifier; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** - * Model tests for OpenItemDiffs + * Model tests for OpenNamespaceExtendDTO */ -public class OpenItemDiffsTest { - private final OpenItemDiffs model = new OpenItemDiffs(); +public class OpenNamespaceExtendDTOTest { + private final OpenNamespaceExtendDTO model = new OpenNamespaceExtendDTO(); /** - * Model tests for OpenItemDiffs + * Model tests for OpenNamespaceExtendDTO */ @Test - public void testOpenItemDiffs() { - // TODO: test OpenItemDiffs + public void testOpenNamespaceExtendDTO() { + // TODO: test OpenNamespaceExtendDTO } /** - * Test the property 'namespace' + * Test the property 'isConfigHidden' */ @Test - public void namespaceTest() { - // TODO: test namespace + public void isConfigHiddenTest() { + // TODO: test isConfigHidden } /** - * Test the property 'diffs' + * Test the property 'parentAppId' */ @Test - public void diffsTest() { - // TODO: test diffs + public void parentAppIdTest() { + // TODO: test parentAppId } /** - * Test the property 'extInfo' + * Test the property 'itemModifiedCnt' */ @Test - public void extInfoTest() { - // TODO: test extInfo + public void itemModifiedCntTest() { + // TODO: test itemModifiedCnt } } 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 index a6ee797..099b25e 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java @@ -61,4 +61,12 @@ public void lockedByTest() { // TODO: test lockedBy } + /** + * Test the property 'isEmergencyPublishAllowed' + */ + @Test + public void isEmergencyPublishAllowedTest() { + // TODO: test isEmergencyPublishAllowed + } + } diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java similarity index 85% rename from java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java index 8c85626..71a4c18 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncModelTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java @@ -28,17 +28,17 @@ /** - * Model tests for OpenNamespaceSyncModel + * Model tests for OpenNamespaceSyncDTO */ -public class OpenNamespaceSyncModelTest { - private final OpenNamespaceSyncModel model = new OpenNamespaceSyncModel(); +public class OpenNamespaceSyncDTOTest { + private final OpenNamespaceSyncDTO model = new OpenNamespaceSyncDTO(); /** - * Model tests for OpenNamespaceSyncModel + * Model tests for OpenNamespaceSyncDTO */ @Test - public void testOpenNamespaceSyncModel() { - // TODO: test OpenNamespaceSyncModel + public void testOpenNamespaceSyncDTO() { + // TODO: test OpenNamespaceSyncDTO } /** diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java new file mode 100644 index 0000000..6ed6bc6 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java @@ -0,0 +1,96 @@ +/* + * Apollo OpenAPI + *

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\"
+ * + * 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 org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for OpenNamespaceUsageDTO + */ +public class OpenNamespaceUsageDTOTest { + private final OpenNamespaceUsageDTO model = new OpenNamespaceUsageDTO(); + + /** + * Model tests for OpenNamespaceUsageDTO + */ + @Test + public void testOpenNamespaceUsageDTO() { + // TODO: test OpenNamespaceUsageDTO + } + + /** + * Test the property 'namespaceName' + */ + @Test + public void namespaceNameTest() { + // TODO: test namespaceName + } + + /** + * 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 'envName' + */ + @Test + public void envNameTest() { + // TODO: test envName + } + + /** + * Test the property 'instanceCount' + */ + @Test + public void instanceCountTest() { + // TODO: test instanceCount + } + + /** + * Test the property 'branchInstanceCount' + */ + @Test + public void branchInstanceCountTest() { + // TODO: test branchInstanceCount + } + + /** + * Test the property 'linkedNamespaceCount' + */ + @Test + public void linkedNamespaceCountTest() { + // TODO: test linkedNamespaceCount + } + +} diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES index 1d80d98..db328f9 100644 --- a/python/.openapi-generator/FILES +++ b/python/.openapi-generator/FILES @@ -7,11 +7,13 @@ apollo_openapi/__init__.py apollo_openapi/api_client.py apollo_openapi/apis/__init__.py apollo_openapi/apis/tags/app_management_api.py +apollo_openapi/apis/tags/app_namespace_management_api.py apollo_openapi/apis/tags/cluster_management_api.py apollo_openapi/apis/tags/environment_management_api.py apollo_openapi/apis/tags/instance_management_api.py apollo_openapi/apis/tags/item_management_api.py apollo_openapi/apis/tags/namespace_branch_management_api.py +apollo_openapi/apis/tags/namespace_lock_management_api.py apollo_openapi/apis/tags/namespace_management_api.py apollo_openapi/apis/tags/organization_management_api.py apollo_openapi/apis/tags/release_management_api.py @@ -24,8 +26,6 @@ apollo_openapi/model/kv_entity.py apollo_openapi/model/kv_entity.pyi apollo_openapi/model/map_string.py apollo_openapi/model/map_string.pyi -apollo_openapi/model/multi_response_entity.py -apollo_openapi/model/multi_response_entity.pyi apollo_openapi/model/namespace_gray_del_release_dto.py apollo_openapi/model/namespace_gray_del_release_dto.pyi apollo_openapi/model/namespace_release_dto.py @@ -38,6 +38,10 @@ apollo_openapi/model/open_cluster_dto.py apollo_openapi/model/open_cluster_dto.pyi apollo_openapi/model/open_create_app_dto.py apollo_openapi/model/open_create_app_dto.pyi +apollo_openapi/model/open_create_item_dto.py +apollo_openapi/model/open_create_item_dto.pyi +apollo_openapi/model/open_create_namespace_dto.py +apollo_openapi/model/open_create_namespace_dto.pyi apollo_openapi/model/open_env_cluster_dto.py apollo_openapi/model/open_env_cluster_dto.pyi apollo_openapi/model/open_env_cluster_info.py @@ -54,56 +58,63 @@ apollo_openapi/model/open_instance_page_dto.py apollo_openapi/model/open_instance_page_dto.pyi apollo_openapi/model/open_item_change_sets.py apollo_openapi/model/open_item_change_sets.pyi -apollo_openapi/model/open_item_diffs.py -apollo_openapi/model/open_item_diffs.pyi +apollo_openapi/model/open_item_diff_dto.py +apollo_openapi/model/open_item_diff_dto.pyi apollo_openapi/model/open_item_dto.py apollo_openapi/model/open_item_dto.pyi +apollo_openapi/model/open_item_extend_dto.py +apollo_openapi/model/open_item_extend_dto.pyi apollo_openapi/model/open_item_page_dto.py apollo_openapi/model/open_item_page_dto.pyi apollo_openapi/model/open_miss_env_dto.py apollo_openapi/model/open_miss_env_dto.pyi apollo_openapi/model/open_namespace_dto.py apollo_openapi/model/open_namespace_dto.pyi +apollo_openapi/model/open_namespace_extend_dto.py +apollo_openapi/model/open_namespace_extend_dto.pyi apollo_openapi/model/open_namespace_identifier.py apollo_openapi/model/open_namespace_identifier.pyi apollo_openapi/model/open_namespace_lock_dto.py apollo_openapi/model/open_namespace_lock_dto.pyi -apollo_openapi/model/open_namespace_sync_model.py -apollo_openapi/model/open_namespace_sync_model.pyi +apollo_openapi/model/open_namespace_sync_dto.py +apollo_openapi/model/open_namespace_sync_dto.pyi apollo_openapi/model/open_namespace_text_model.py apollo_openapi/model/open_namespace_text_model.pyi +apollo_openapi/model/open_namespace_usage_dto.py +apollo_openapi/model/open_namespace_usage_dto.pyi apollo_openapi/model/open_organization_dto.py apollo_openapi/model/open_organization_dto.pyi apollo_openapi/model/open_release_bo.py apollo_openapi/model/open_release_bo.pyi apollo_openapi/model/open_release_dto.py apollo_openapi/model/open_release_dto.pyi -apollo_openapi/model/rich_response_entity.py -apollo_openapi/model/rich_response_entity.pyi apollo_openapi/model/string_to_string_bool_map.py apollo_openapi/model/string_to_string_bool_map.pyi apollo_openapi/models/__init__.py apollo_openapi/rest.py apollo_openapi/schemas.py docs/apis/tags/AppManagementApi.md +docs/apis/tags/AppNamespaceManagementApi.md docs/apis/tags/ClusterManagementApi.md docs/apis/tags/EnvironmentManagementApi.md docs/apis/tags/InstanceManagementApi.md docs/apis/tags/ItemManagementApi.md docs/apis/tags/NamespaceBranchManagementApi.md +docs/apis/tags/NamespaceLockManagementApi.md docs/apis/tags/NamespaceManagementApi.md docs/apis/tags/OrganizationManagementApi.md docs/apis/tags/ReleaseManagementApi.md docs/models/ExceptionResponse.md docs/models/KVEntity.md docs/models/MapString.md -docs/models/MultiResponseEntity.md docs/models/NamespaceGrayDelReleaseDTO.md docs/models/NamespaceReleaseDTO.md docs/models/OpenAppDTO.md docs/models/OpenAppNamespaceDTO.md docs/models/OpenClusterDTO.md docs/models/OpenCreateAppDTO.md +docs/models/OpenCreateItemDTO.md +docs/models/OpenCreateNamespaceDTO.md docs/models/OpenEnvClusterDTO.md docs/models/OpenEnvClusterInfo.md docs/models/OpenGrayReleaseRuleDTO.md @@ -113,18 +124,20 @@ docs/models/OpenInstanceDTO.md docs/models/OpenInstancePageDTO.md docs/models/OpenItemChangeSets.md docs/models/OpenItemDTO.md -docs/models/OpenItemDiffs.md +docs/models/OpenItemDiffDTO.md +docs/models/OpenItemExtendDTO.md docs/models/OpenItemPageDTO.md docs/models/OpenMissEnvDTO.md docs/models/OpenNamespaceDTO.md +docs/models/OpenNamespaceExtendDTO.md docs/models/OpenNamespaceIdentifier.md docs/models/OpenNamespaceLockDTO.md -docs/models/OpenNamespaceSyncModel.md +docs/models/OpenNamespaceSyncDTO.md docs/models/OpenNamespaceTextModel.md +docs/models/OpenNamespaceUsageDTO.md docs/models/OpenOrganizationDto.md docs/models/OpenReleaseBO.md docs/models/OpenReleaseDTO.md -docs/models/RichResponseEntity.md docs/models/StringToStringBoolMap.md git_push.sh requirements.txt @@ -136,13 +149,14 @@ test/test_models/__init__.py test/test_models/test_exception_response.py test/test_models/test_kv_entity.py test/test_models/test_map_string.py -test/test_models/test_multi_response_entity.py test/test_models/test_namespace_gray_del_release_dto.py test/test_models/test_namespace_release_dto.py test/test_models/test_open_app_dto.py test/test_models/test_open_app_namespace_dto.py test/test_models/test_open_cluster_dto.py test/test_models/test_open_create_app_dto.py +test/test_models/test_open_create_item_dto.py +test/test_models/test_open_create_namespace_dto.py test/test_models/test_open_env_cluster_dto.py test/test_models/test_open_env_cluster_info.py test/test_models/test_open_gray_release_rule_dto.py @@ -151,18 +165,20 @@ test/test_models/test_open_instance_config_dto.py test/test_models/test_open_instance_dto.py test/test_models/test_open_instance_page_dto.py test/test_models/test_open_item_change_sets.py -test/test_models/test_open_item_diffs.py +test/test_models/test_open_item_diff_dto.py test/test_models/test_open_item_dto.py +test/test_models/test_open_item_extend_dto.py test/test_models/test_open_item_page_dto.py test/test_models/test_open_miss_env_dto.py test/test_models/test_open_namespace_dto.py +test/test_models/test_open_namespace_extend_dto.py test/test_models/test_open_namespace_identifier.py test/test_models/test_open_namespace_lock_dto.py -test/test_models/test_open_namespace_sync_model.py +test/test_models/test_open_namespace_sync_dto.py test/test_models/test_open_namespace_text_model.py +test/test_models/test_open_namespace_usage_dto.py test/test_models/test_open_organization_dto.py test/test_models/test_open_release_bo.py test/test_models/test_open_release_dto.py -test/test_models/test_rich_response_entity.py test/test_models/test_string_to_string_bool_map.py tox.ini diff --git a/python/README.md b/python/README.md index fce4983..4abc575 100644 --- a/python/README.md +++ b/python/README.md @@ -228,6 +228,13 @@ Class | Method | HTTP request | Description *AppManagementApi* | [**get_env_cluster_info**](docs/apis/tags/AppManagementApi.md#get_env_cluster_info) | **get** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) *AppManagementApi* | [**get_env_clusters**](docs/apis/tags/AppManagementApi.md#get_env_clusters) | **get** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) *AppManagementApi* | [**update_app**](docs/apis/tags/AppManagementApi.md#update_app) | **put** /openapi/v1/apps/{appId} | 更新应用(new added) +*AppNamespaceManagementApi* | [**create_app_namespace**](docs/apis/tags/AppNamespaceManagementApi.md#create_app_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) +*AppNamespaceManagementApi* | [**delete_app_namespace**](docs/apis/tags/AppNamespaceManagementApi.md#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) +*AppNamespaceManagementApi* | [**find_app_namespace**](docs/apis/tags/AppNamespaceManagementApi.md#find_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) +*AppNamespaceManagementApi* | [**find_app_namespace_usage**](docs/apis/tags/AppNamespaceManagementApi.md#find_app_namespace_usage) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) +*AppNamespaceManagementApi* | [**get_app_namespaces**](docs/apis/tags/AppNamespaceManagementApi.md#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) +*AppNamespaceManagementApi* | [**get_app_namespaces_by_app_id**](docs/apis/tags/AppNamespaceManagementApi.md#get_app_namespaces_by_app_id) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) +*AppNamespaceManagementApi* | [**get_public_app_namespace_instances**](docs/apis/tags/AppNamespaceManagementApi.md#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) *ClusterManagementApi* | [**create_cluster**](docs/apis/tags/ClusterManagementApi.md#create_cluster) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) *ClusterManagementApi* | [**delete_cluster**](docs/apis/tags/ClusterManagementApi.md#delete_cluster) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) *ClusterManagementApi* | [**get_cluster**](docs/apis/tags/ClusterManagementApi.md#get_cluster) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) @@ -236,39 +243,37 @@ Class | Method | HTTP request | Description *InstanceManagementApi* | [**get_by_release**](docs/apis/tags/InstanceManagementApi.md#get_by_release) | **get** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) *InstanceManagementApi* | [**get_by_releases_and_namespace_not_in**](docs/apis/tags/InstanceManagementApi.md#get_by_releases_and_namespace_not_in) | **get** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) *InstanceManagementApi* | [**get_instance_count_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -*ItemManagementApi* | [**batch_update_items_by_text**](docs/apis/tags/ItemManagementApi.md#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) -*ItemManagementApi* | [**compare_items**](docs/apis/tags/ItemManagementApi.md#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) +*ItemManagementApi* | [**batch_update_items_by_text**](docs/apis/tags/ItemManagementApi.md#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) +*ItemManagementApi* | [**compare_items**](docs/apis/tags/ItemManagementApi.md#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) *ItemManagementApi* | [**create_item**](docs/apis/tags/ItemManagementApi.md#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) *ItemManagementApi* | [**delete_item**](docs/apis/tags/ItemManagementApi.md#delete_item) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) *ItemManagementApi* | [**delete_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#delete_item_by_encoded_key) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) +*ItemManagementApi* | [**find_branch_items**](docs/apis/tags/ItemManagementApi.md#find_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) *ItemManagementApi* | [**find_items_by_namespace**](docs/apis/tags/ItemManagementApi.md#find_items_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) -*ItemManagementApi* | [**get_branch_items**](docs/apis/tags/ItemManagementApi.md#get_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) *ItemManagementApi* | [**get_item**](docs/apis/tags/ItemManagementApi.md#get_item) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) *ItemManagementApi* | [**get_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#get_item_by_encoded_key) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) -*ItemManagementApi* | [**revert_items**](docs/apis/tags/ItemManagementApi.md#revert_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) -*ItemManagementApi* | [**sync_items**](docs/apis/tags/ItemManagementApi.md#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) +*ItemManagementApi* | [**revert_items**](docs/apis/tags/ItemManagementApi.md#revert_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation | 撤销配置项更改 (new added) +*ItemManagementApi* | [**sync_items**](docs/apis/tags/ItemManagementApi.md#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) +*ItemManagementApi* | [**syntax_check**](docs/apis/tags/ItemManagementApi.md#syntax_check) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) *ItemManagementApi* | [**update_item**](docs/apis/tags/ItemManagementApi.md#update_item) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) *ItemManagementApi* | [**update_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#update_item_by_encoded_key) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) -*ItemManagementApi* | [**validate_items**](docs/apis/tags/ItemManagementApi.md#validate_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) *NamespaceBranchManagementApi* | [**create_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#create_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 创建命名空间分支 (original openapi) *NamespaceBranchManagementApi* | [**delete_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#delete_branch) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) *NamespaceBranchManagementApi* | [**find_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#find_branch) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) *NamespaceBranchManagementApi* | [**get_branch_gray_rules**](docs/apis/tags/NamespaceBranchManagementApi.md#get_branch_gray_rules) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) -*NamespaceBranchManagementApi* | [**merge_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#merge_branch) | **patch** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) +*NamespaceBranchManagementApi* | [**merge**](docs/apis/tags/NamespaceBranchManagementApi.md#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) +*NamespaceBranchManagementApi* | [**merge_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#merge_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) *NamespaceBranchManagementApi* | [**update_branch_rules**](docs/apis/tags/NamespaceBranchManagementApi.md#update_branch_rules) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) -*NamespaceManagementApi* | [**check_namespace_integrity**](docs/apis/tags/NamespaceManagementApi.md#check_namespace_integrity) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) -*NamespaceManagementApi* | [**create_namespace**](docs/apis/tags/NamespaceManagementApi.md#create_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) -*NamespaceManagementApi* | [**delete_app_namespace**](docs/apis/tags/NamespaceManagementApi.md#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) -*NamespaceManagementApi* | [**delete_namespace_links**](docs/apis/tags/NamespaceManagementApi.md#delete_namespace_links) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) +*NamespaceLockManagementApi* | [**get_namespace_lock**](docs/apis/tags/NamespaceLockManagementApi.md#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +*NamespaceManagementApi* | [**create_missing_namespaces**](docs/apis/tags/NamespaceManagementApi.md#create_missing_namespaces) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) +*NamespaceManagementApi* | [**create_namespaces**](docs/apis/tags/NamespaceManagementApi.md#create_namespaces) | **post** /openapi/v1/namespaces | 创建Namespace (new added) +*NamespaceManagementApi* | [**delete_namespace**](docs/apis/tags/NamespaceManagementApi.md#delete_namespace) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) +*NamespaceManagementApi* | [**find_missing_namespaces**](docs/apis/tags/NamespaceManagementApi.md#find_missing_namespaces) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) +*NamespaceManagementApi* | [**find_namespace**](docs/apis/tags/NamespaceManagementApi.md#find_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) +*NamespaceManagementApi* | [**find_namespace_usage**](docs/apis/tags/NamespaceManagementApi.md#find_namespace_usage) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) *NamespaceManagementApi* | [**find_namespaces**](docs/apis/tags/NamespaceManagementApi.md#find_namespaces) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) -*NamespaceManagementApi* | [**get_app_namespace**](docs/apis/tags/NamespaceManagementApi.md#get_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) -*NamespaceManagementApi* | [**get_app_namespaces**](docs/apis/tags/NamespaceManagementApi.md#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) -*NamespaceManagementApi* | [**get_app_namespaces_by_app**](docs/apis/tags/NamespaceManagementApi.md#get_app_namespaces_by_app) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) -*NamespaceManagementApi* | [**get_namespace_lock**](docs/apis/tags/NamespaceManagementApi.md#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +*NamespaceManagementApi* | [**find_public_namespace_for_associated_namespace**](docs/apis/tags/NamespaceManagementApi.md#find_public_namespace_for_associated_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) *NamespaceManagementApi* | [**get_namespaces_release_status**](docs/apis/tags/NamespaceManagementApi.md#get_namespaces_release_status) | **get** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) -*NamespaceManagementApi* | [**get_public_app_namespace_instances**](docs/apis/tags/NamespaceManagementApi.md#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) -*NamespaceManagementApi* | [**get_public_namespace_association**](docs/apis/tags/NamespaceManagementApi.md#get_public_namespace_association) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) -*NamespaceManagementApi* | [**load_namespace**](docs/apis/tags/NamespaceManagementApi.md#load_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) *OrganizationManagementApi* | [**get_organization**](docs/apis/tags/OrganizationManagementApi.md#get_organization) | **get** /openapi/v1/organizations | 获取所有组织信息 (original openapi) *ReleaseManagementApi* | [**create_gray_del_release**](docs/apis/tags/ReleaseManagementApi.md#create_gray_del_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases | 创建灰度删除发布 (original openapi) *ReleaseManagementApi* | [**create_gray_release**](docs/apis/tags/ReleaseManagementApi.md#create_gray_release) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases | 创建灰度发布 (original openapi) @@ -277,7 +282,6 @@ Class | Method | HTTP request | Description *ReleaseManagementApi* | [**find_all_releases**](docs/apis/tags/ReleaseManagementApi.md#find_all_releases) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) *ReleaseManagementApi* | [**get_release_by_id**](docs/apis/tags/ReleaseManagementApi.md#get_release_by_id) | **get** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) *ReleaseManagementApi* | [**load_latest_active_release**](docs/apis/tags/ReleaseManagementApi.md#load_latest_active_release) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) -*ReleaseManagementApi* | [**merge**](docs/apis/tags/ReleaseManagementApi.md#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) *ReleaseManagementApi* | [**rollback**](docs/apis/tags/ReleaseManagementApi.md#rollback) | **put** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) ## Documentation For Models @@ -285,13 +289,14 @@ Class | Method | HTTP request | Description - [ExceptionResponse](docs/models/ExceptionResponse.md) - [KVEntity](docs/models/KVEntity.md) - [MapString](docs/models/MapString.md) - - [MultiResponseEntity](docs/models/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDTO](docs/models/NamespaceGrayDelReleaseDTO.md) - [NamespaceReleaseDTO](docs/models/NamespaceReleaseDTO.md) - [OpenAppDTO](docs/models/OpenAppDTO.md) - [OpenAppNamespaceDTO](docs/models/OpenAppNamespaceDTO.md) - [OpenClusterDTO](docs/models/OpenClusterDTO.md) - [OpenCreateAppDTO](docs/models/OpenCreateAppDTO.md) + - [OpenCreateItemDTO](docs/models/OpenCreateItemDTO.md) + - [OpenCreateNamespaceDTO](docs/models/OpenCreateNamespaceDTO.md) - [OpenEnvClusterDTO](docs/models/OpenEnvClusterDTO.md) - [OpenEnvClusterInfo](docs/models/OpenEnvClusterInfo.md) - [OpenGrayReleaseRuleDTO](docs/models/OpenGrayReleaseRuleDTO.md) @@ -301,18 +306,20 @@ Class | Method | HTTP request | Description - [OpenInstancePageDTO](docs/models/OpenInstancePageDTO.md) - [OpenItemChangeSets](docs/models/OpenItemChangeSets.md) - [OpenItemDTO](docs/models/OpenItemDTO.md) - - [OpenItemDiffs](docs/models/OpenItemDiffs.md) + - [OpenItemDiffDTO](docs/models/OpenItemDiffDTO.md) + - [OpenItemExtendDTO](docs/models/OpenItemExtendDTO.md) - [OpenItemPageDTO](docs/models/OpenItemPageDTO.md) - [OpenMissEnvDTO](docs/models/OpenMissEnvDTO.md) - [OpenNamespaceDTO](docs/models/OpenNamespaceDTO.md) + - [OpenNamespaceExtendDTO](docs/models/OpenNamespaceExtendDTO.md) - [OpenNamespaceIdentifier](docs/models/OpenNamespaceIdentifier.md) - [OpenNamespaceLockDTO](docs/models/OpenNamespaceLockDTO.md) - - [OpenNamespaceSyncModel](docs/models/OpenNamespaceSyncModel.md) + - [OpenNamespaceSyncDTO](docs/models/OpenNamespaceSyncDTO.md) - [OpenNamespaceTextModel](docs/models/OpenNamespaceTextModel.md) + - [OpenNamespaceUsageDTO](docs/models/OpenNamespaceUsageDTO.md) - [OpenOrganizationDto](docs/models/OpenOrganizationDto.md) - [OpenReleaseBO](docs/models/OpenReleaseBO.md) - [OpenReleaseDTO](docs/models/OpenReleaseDTO.md) - - [RichResponseEntity](docs/models/RichResponseEntity.md) - [StringToStringBoolMap](docs/models/StringToStringBoolMap.md) ## Documentation For Authorization @@ -338,6 +345,8 @@ Authentication schemes defined for the API: + + ## Notes for Large OpenAPI documents If the OpenAPI document is large, imports in apollo_openapi.apis and apollo_openapi.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: diff --git a/python/apollo_openapi/apis/path_to_api.py b/python/apollo_openapi/apis/path_to_api.py index d957143..4969214 100644 --- a/python/apollo_openapi/apis/path_to_api.py +++ b/python/apollo_openapi/apis/path_to_api.py @@ -12,12 +12,11 @@ from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterName from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters import OpenapiV1EnvsEnvAppsAppIdClusters from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases @@ -33,17 +32,20 @@ from apollo_openapi.apis.paths.openapi_v1_envs_env_instances_by_release import OpenapiV1EnvsEnvInstancesByRelease from apollo_openapi.apis.paths.openapi_v1_envs_env_instances_by_namespace import OpenapiV1EnvsEnvInstancesByNamespace from apollo_openapi.apis.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in import OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn +from apollo_openapi.apis.paths.openapi_v1_namespaces import OpenapiV1Namespaces +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage import OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces import OpenapiV1AppsAppIdAppnamespaces from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName +from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock from apollo_openapi.apis.paths.openapi_v1_appnamespaces import OpenapiV1Appnamespaces from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name import OpenapiV1AppsAppIdAppnamespacesNamespaceName from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_releases_status import OpenapiV1AppsAppIdNamespacesReleasesStatus from apollo_openapi.apis.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances import OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName from apollo_openapi.apis.paths.openapi_v1_organizations import OpenapiV1Organizations from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName @@ -64,12 +66,11 @@ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_DIFF: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterName, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS: OpenapiV1EnvsEnvAppsAppIdClusters, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases, @@ -85,17 +86,20 @@ PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE: OpenapiV1EnvsEnvInstancesByRelease, PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE: OpenapiV1EnvsEnvInstancesByNamespace, PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN: OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn, + PathValues.OPENAPI_V1_NAMESPACES: OpenapiV1Namespaces, + PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage, PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock, PathValues.OPENAPI_V1_APPNAMESPACES: OpenapiV1Appnamespaces, PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdAppnamespacesNamespaceName, PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS: OpenapiV1AppsAppIdNamespacesReleasesStatus, PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName, PathValues.OPENAPI_V1_ORGANIZATIONS: OpenapiV1Organizations, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName, @@ -117,12 +121,11 @@ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameItems, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_DIFF: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterName, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS: OpenapiV1EnvsEnvAppsAppIdClusters, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases, @@ -138,17 +141,20 @@ PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE: OpenapiV1EnvsEnvInstancesByRelease, PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE: OpenapiV1EnvsEnvInstancesByNamespace, PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN: OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn, + PathValues.OPENAPI_V1_NAMESPACES: OpenapiV1Namespaces, + PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage, PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, + PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock, PathValues.OPENAPI_V1_APPNAMESPACES: OpenapiV1Appnamespaces, PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdAppnamespacesNamespaceName, PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS: OpenapiV1AppsAppIdNamespacesReleasesStatus, PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName, PathValues.OPENAPI_V1_ORGANIZATIONS: OpenapiV1Organizations, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName, diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.py new file mode 100644 index 0000000..be5b730 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.get import ApiForget + + +class OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py new file mode 100644 index 0000000..1a53a51 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py @@ -0,0 +1,9 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.get import ApiForget +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.post import ApiForpost + + +class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces( + ApiForget, + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py deleted file mode 100644 index 77a0c3c..0000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py similarity index 63% rename from python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py rename to python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py index cf1045d..a4e5f60 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.delete import ApiFordelete +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.delete import ApiFordelete -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks( +class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName( ApiFordelete, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py similarity index 58% rename from python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py rename to python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py index f089f28..2b5ce2c 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.get import ApiForget +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.get import ApiForget -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation( +class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage( ApiForget, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.py similarity index 50% rename from python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py rename to python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.py index 706086b..b8ef52a 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.put import ApiForput +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.get import ApiForget -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate( - ApiForput, +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace( + ApiForget, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py index ece2b78..f057a29 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py @@ -1,9 +1,9 @@ +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.post import ApiForpost from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.delete import ApiFordelete -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.patch import ApiForpatch class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName( + ApiForpost, ApiFordelete, - ApiForpatch, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py index 0438cb9..79f5479 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py @@ -1,9 +1,11 @@ from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.get import ApiForget +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.put import ApiForput from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.post import ApiForpost class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems( ApiForget, + ApiForput, ApiForpost, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py similarity index 66% rename from python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py rename to python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py index 9a5c027..09dda6c 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.post import ApiForpost +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.post import ApiForpost -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync( +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff( ApiForpost, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.py similarity index 59% rename from python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py rename to python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.py index e43b1d6..7f5611a 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.post import ApiForpost +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.post import ApiForpost -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare( +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation( ApiForpost, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py similarity index 58% rename from python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py rename to python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py index 5c8218a..9fcbe9d 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.post import ApiForpost +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.post import ApiForpost -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert( +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize( ApiForpost, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py similarity index 59% rename from python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py rename to python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py index 1819eed..a29dcb9 100644 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.py +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py @@ -1,7 +1,7 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.post import ApiForpost +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.post import ApiForpost -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate( +class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation( ApiForpost, ): pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_namespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_namespaces.py new file mode 100644 index 0000000..3bba137 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_namespaces.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_namespaces.post import ApiForpost + + +class OpenapiV1Namespaces( + ApiForpost, +): + pass diff --git a/python/apollo_openapi/apis/tag_to_api.py b/python/apollo_openapi/apis/tag_to_api.py index 08add91..b8607f6 100644 --- a/python/apollo_openapi/apis/tag_to_api.py +++ b/python/apollo_openapi/apis/tag_to_api.py @@ -6,11 +6,12 @@ from apollo_openapi.apis.tags.release_management_api import ReleaseManagementApi from apollo_openapi.apis.tags.cluster_management_api import ClusterManagementApi from apollo_openapi.apis.tags.namespace_management_api import NamespaceManagementApi -from apollo_openapi.apis.tags.namespace_namespace_branch_management_api import NamespaceNamespaceBranchManagementApi +from apollo_openapi.apis.tags.app_namespace_management_api import AppNamespaceManagementApi +from apollo_openapi.apis.tags.namespace_lock_management_api import NamespaceLockManagementApi +from apollo_openapi.apis.tags.namespace_branch_management_api import NamespaceBranchManagementApi from apollo_openapi.apis.tags.instance_management_api import InstanceManagementApi from apollo_openapi.apis.tags.organization_management_api import OrganizationManagementApi from apollo_openapi.apis.tags.environment_management_api import EnvironmentManagementApi -from apollo_openapi.apis.tags.namespace_branch_management_api import NamespaceBranchManagementApi TagToApi = typing_extensions.TypedDict( 'TagToApi', @@ -20,11 +21,12 @@ TagValues.RELEASE_MANAGEMENT: ReleaseManagementApi, TagValues.CLUSTER_MANAGEMENT: ClusterManagementApi, TagValues.NAMESPACE_MANAGEMENT: NamespaceManagementApi, - TagValues.NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT: NamespaceNamespaceBranchManagementApi, + TagValues.APP_NAMESPACE_MANAGEMENT: AppNamespaceManagementApi, + TagValues.NAMESPACE_LOCK_MANAGEMENT: NamespaceLockManagementApi, + TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi, TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi, TagValues.ENVIRONMENT_MANAGEMENT: EnvironmentManagementApi, - TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, } ) @@ -35,10 +37,11 @@ TagValues.RELEASE_MANAGEMENT: ReleaseManagementApi, TagValues.CLUSTER_MANAGEMENT: ClusterManagementApi, TagValues.NAMESPACE_MANAGEMENT: NamespaceManagementApi, - TagValues.NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT: NamespaceNamespaceBranchManagementApi, + TagValues.APP_NAMESPACE_MANAGEMENT: AppNamespaceManagementApi, + TagValues.NAMESPACE_LOCK_MANAGEMENT: NamespaceLockManagementApi, + TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi, TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi, TagValues.ENVIRONMENT_MANAGEMENT: EnvironmentManagementApi, - TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, } ) diff --git a/python/apollo_openapi/apis/tags/__init__.py b/python/apollo_openapi/apis/tags/__init__.py index eaf2d81..631942e 100644 --- a/python/apollo_openapi/apis/tags/__init__.py +++ b/python/apollo_openapi/apis/tags/__init__.py @@ -11,8 +11,9 @@ class TagValues(str, enum.Enum): RELEASE_MANAGEMENT = "Release Management" CLUSTER_MANAGEMENT = "Cluster Management" NAMESPACE_MANAGEMENT = "Namespace Management" - NAMESPACE_NAMESPACE_BRANCH_MANAGEMENT = "Namespace Namespace Branch Management" + APP_NAMESPACE_MANAGEMENT = "AppNamespace Management" + NAMESPACE_LOCK_MANAGEMENT = "Namespace Lock Management" + NAMESPACE_BRANCH_MANAGEMENT = "Namespace Branch Management" INSTANCE_MANAGEMENT = "Instance Management" ORGANIZATION_MANAGEMENT = "Organization Management" ENVIRONMENT_MANAGEMENT = "Environment Management" - NAMESPACE_BRANCH_MANAGEMENT = "Namespace Branch Management" diff --git a/python/apollo_openapi/apis/tags/app_namespace_management_api.py b/python/apollo_openapi/apis/tags/app_namespace_management_api.py new file mode 100644 index 0000000..4fa7736 --- /dev/null +++ b/python/apollo_openapi/apis/tags/app_namespace_management_api.py @@ -0,0 +1,35 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.post import CreateAppNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.delete import DeleteAppNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.get import FindAppNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.get import FindAppNamespaceUsage +from apollo_openapi.paths.openapi_v1_appnamespaces.get import GetAppNamespaces +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.get import GetAppNamespacesByAppId +from apollo_openapi.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.get import GetPublicAppNamespaceInstances + + +class AppNamespaceManagementApi( + CreateAppNamespace, + DeleteAppNamespace, + FindAppNamespace, + FindAppNamespaceUsage, + GetAppNamespaces, + GetAppNamespacesByAppId, + GetPublicAppNamespaceInstances, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/item_management_api.py b/python/apollo_openapi/apis/tags/item_management_api.py index 909e30b..c2d7d8b 100644 --- a/python/apollo_openapi/apis/tags/item_management_api.py +++ b/python/apollo_openapi/apis/tags/item_management_api.py @@ -9,20 +9,20 @@ Generated by: https://openapi-generator.tech """ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update.put import BatchUpdateItemsByText -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare.post import CompareItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.put import BatchUpdateItemsByText +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.post import CompareItems from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.post import CreateItem from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.delete import DeleteItem from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.delete import DeleteItemByEncodedKey +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.get import FindBranchItems from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.get import FindItemsByNamespace -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.get import GetBranchItems from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.get import GetItem from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.get import GetItemByEncodedKey -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert.post import RevertItems -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync.post import SyncItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.post import RevertItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.post import SyncItems +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.post import SyntaxCheck from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.put import UpdateItem from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.put import UpdateItemByEncodedKey -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate.post import ValidateItems class ItemManagementApi( @@ -31,15 +31,15 @@ class ItemManagementApi( CreateItem, DeleteItem, DeleteItemByEncodedKey, + FindBranchItems, FindItemsByNamespace, - GetBranchItems, GetItem, GetItemByEncodedKey, RevertItems, SyncItems, + SyntaxCheck, UpdateItem, UpdateItemByEncodedKey, - ValidateItems, ): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech diff --git a/python/apollo_openapi/apis/tags/namespace_branch_management_api.py b/python/apollo_openapi/apis/tags/namespace_branch_management_api.py index 2f328bd..bf07a44 100644 --- a/python/apollo_openapi/apis/tags/namespace_branch_management_api.py +++ b/python/apollo_openapi/apis/tags/namespace_branch_management_api.py @@ -13,7 +13,8 @@ from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.delete import DeleteBranch from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.get import FindBranch from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.get import GetBranchGrayRules -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.patch import MergeBranch +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.post import Merge +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.post import MergeBranch from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.put import UpdateBranchRules @@ -22,6 +23,7 @@ class NamespaceBranchManagementApi( DeleteBranch, FindBranch, GetBranchGrayRules, + Merge, MergeBranch, UpdateBranchRules, ): diff --git a/python/apollo_openapi/apis/tags/namespace_lock_management_api.py b/python/apollo_openapi/apis/tags/namespace_lock_management_api.py new file mode 100644 index 0000000..941795f --- /dev/null +++ b/python/apollo_openapi/apis/tags/namespace_lock_management_api.py @@ -0,0 +1,23 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.get import GetNamespaceLock + + +class NamespaceLockManagementApi( + GetNamespaceLock, +): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + pass diff --git a/python/apollo_openapi/apis/tags/namespace_management_api.py b/python/apollo_openapi/apis/tags/namespace_management_api.py index 56b7a87..e2d1f49 100644 --- a/python/apollo_openapi/apis/tags/namespace_management_api.py +++ b/python/apollo_openapi/apis/tags/namespace_management_api.py @@ -9,35 +9,27 @@ Generated by: https://openapi-generator.tech """ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check.get import CheckNamespaceIntegrity -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.post import CreateNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.delete import DeleteAppNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links.delete import DeleteNamespaceLinks +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.post import CreateMissingNamespaces +from apollo_openapi.paths.openapi_v1_namespaces.post import CreateNamespaces +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.delete import DeleteNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.get import FindMissingNamespaces +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.get import FindNamespace +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.get import FindNamespaceUsage from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.get import FindNamespaces -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.get import GetAppNamespace -from apollo_openapi.paths.openapi_v1_appnamespaces.get import GetAppNamespaces -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.get import GetAppNamespacesByApp -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.get import GetNamespaceLock +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.get import FindPublicNamespaceForAssociatedNamespace from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_releases_status.get import GetNamespacesReleaseStatus -from apollo_openapi.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.get import GetPublicAppNamespaceInstances -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association.get import GetPublicNamespaceAssociation -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.get import LoadNamespace class NamespaceManagementApi( - CheckNamespaceIntegrity, - CreateNamespace, - DeleteAppNamespace, - DeleteNamespaceLinks, + CreateMissingNamespaces, + CreateNamespaces, + DeleteNamespace, + FindMissingNamespaces, + FindNamespace, + FindNamespaceUsage, FindNamespaces, - GetAppNamespace, - GetAppNamespaces, - GetAppNamespacesByApp, - GetNamespaceLock, + FindPublicNamespaceForAssociatedNamespace, GetNamespacesReleaseStatus, - GetPublicAppNamespaceInstances, - GetPublicNamespaceAssociation, - LoadNamespace, ): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech diff --git a/python/apollo_openapi/apis/tags/release_management_api.py b/python/apollo_openapi/apis/tags/release_management_api.py index 1487c1f..b1b9e80 100644 --- a/python/apollo_openapi/apis/tags/release_management_api.py +++ b/python/apollo_openapi/apis/tags/release_management_api.py @@ -16,7 +16,6 @@ from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all.get import FindAllReleases from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id.get import GetReleaseById from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.get import LoadLatestActiveRelease -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.post import Merge from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_rollback.put import Rollback @@ -28,7 +27,6 @@ class ReleaseManagementApi( FindAllReleases, GetReleaseById, LoadLatestActiveRelease, - Merge, Rollback, ): """NOTE: This class is auto generated by OpenAPI Generator diff --git a/python/apollo_openapi/model/multi_response_entity.py b/python/apollo_openapi/model/multi_response_entity.py deleted file mode 100644 index bb463e4..0000000 --- a/python/apollo_openapi/model/multi_response_entity.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

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\"
# noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - - -class MultiResponseEntity( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A response container holding multiple RichResponseEntity objects - """ - - - class MetaOapg: - required = { - "code", - "entities", - } - - class properties: - code = schemas.IntSchema - - - class entities( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['RichResponseEntity']: - return RichResponseEntity - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['RichResponseEntity'], typing.List['RichResponseEntity']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'entities': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'RichResponseEntity': - return super().__getitem__(i) - __annotations__ = { - "code": code, - "entities": entities, - } - - code: MetaOapg.properties.code - entities: MetaOapg.properties.entities - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["entities"]) -> MetaOapg.properties.entities: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "entities", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["entities"]) -> MetaOapg.properties.entities: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "entities", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], - entities: typing.Union[MetaOapg.properties.entities, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MultiResponseEntity': - return super().__new__( - cls, - *_args, - code=code, - entities=entities, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.rich_response_entity import RichResponseEntity diff --git a/python/apollo_openapi/model/multi_response_entity.pyi b/python/apollo_openapi/model/multi_response_entity.pyi deleted file mode 100644 index bb463e4..0000000 --- a/python/apollo_openapi/model/multi_response_entity.pyi +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

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\"
# noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - - -class MultiResponseEntity( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - A response container holding multiple RichResponseEntity objects - """ - - - class MetaOapg: - required = { - "code", - "entities", - } - - class properties: - code = schemas.IntSchema - - - class entities( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['RichResponseEntity']: - return RichResponseEntity - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['RichResponseEntity'], typing.List['RichResponseEntity']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'entities': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'RichResponseEntity': - return super().__getitem__(i) - __annotations__ = { - "code": code, - "entities": entities, - } - - code: MetaOapg.properties.code - entities: MetaOapg.properties.entities - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["entities"]) -> MetaOapg.properties.entities: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "entities", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["entities"]) -> MetaOapg.properties.entities: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "entities", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], - entities: typing.Union[MetaOapg.properties.entities, list, tuple, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MultiResponseEntity': - return super().__new__( - cls, - *_args, - code=code, - entities=entities, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.rich_response_entity import RichResponseEntity diff --git a/python/apollo_openapi/model/open_item_diffs.pyi b/python/apollo_openapi/model/open_create_item_dto.py similarity index 58% rename from python/apollo_openapi/model/open_item_diffs.pyi rename to python/apollo_openapi/model/open_create_item_dto.py index ecdc624..0627910 100644 --- a/python/apollo_openapi/model/open_item_diffs.pyi +++ b/python/apollo_openapi/model/open_create_item_dto.py @@ -23,7 +23,7 @@ from apollo_openapi import schemas # noqa: F401 -class OpenItemDiffs( +class OpenCreateItemDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -36,72 +36,73 @@ class OpenItemDiffs( class MetaOapg: class properties: - - @staticmethod - def namespace() -> typing.Type['OpenNamespaceIdentifier']: - return OpenNamespaceIdentifier - - @staticmethod - def diffs() -> typing.Type['OpenItemChangeSets']: - return OpenItemChangeSets - extInfo = schemas.StrSchema + key = schemas.StrSchema + type = schemas.IntSchema + value = schemas.StrSchema + comment = schemas.StrSchema __annotations__ = { - "namespace": namespace, - "diffs": diffs, - "extInfo": extInfo, + "key": key, + "type": type, + "value": value, + "comment": comment, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["diffs"]) -> 'OpenItemChangeSets': ... + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["extInfo"]) -> MetaOapg.properties.extInfo: ... + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "type", "value", "comment", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["diffs"]) -> typing.Union['OpenItemChangeSets', schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["extInfo"]) -> typing.Union[MetaOapg.properties.extInfo, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["key", "type", "value", "comment", ], str]): return super().get_item_oapg(name) def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], - namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, - diffs: typing.Union['OpenItemChangeSets', schemas.Unset] = schemas.unset, - extInfo: typing.Union[MetaOapg.properties.extInfo, str, schemas.Unset] = schemas.unset, + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenItemDiffs': + ) -> 'OpenCreateItemDTO': return super().__new__( cls, *_args, - namespace=namespace, - diffs=diffs, - extInfo=extInfo, + key=key, + type=type, + value=value, + comment=comment, _configuration=_configuration, **kwargs, ) - -from apollo_openapi.model.open_item_change_sets import OpenItemChangeSets -from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_item_diffs.py b/python/apollo_openapi/model/open_create_item_dto.pyi similarity index 58% rename from python/apollo_openapi/model/open_item_diffs.py rename to python/apollo_openapi/model/open_create_item_dto.pyi index ecdc624..0627910 100644 --- a/python/apollo_openapi/model/open_item_diffs.py +++ b/python/apollo_openapi/model/open_create_item_dto.pyi @@ -23,7 +23,7 @@ from apollo_openapi import schemas # noqa: F401 -class OpenItemDiffs( +class OpenCreateItemDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -36,72 +36,73 @@ class OpenItemDiffs( class MetaOapg: class properties: - - @staticmethod - def namespace() -> typing.Type['OpenNamespaceIdentifier']: - return OpenNamespaceIdentifier - - @staticmethod - def diffs() -> typing.Type['OpenItemChangeSets']: - return OpenItemChangeSets - extInfo = schemas.StrSchema + key = schemas.StrSchema + type = schemas.IntSchema + value = schemas.StrSchema + comment = schemas.StrSchema __annotations__ = { - "namespace": namespace, - "diffs": diffs, - "extInfo": extInfo, + "key": key, + "type": type, + "value": value, + "comment": comment, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["diffs"]) -> 'OpenItemChangeSets': ... + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["extInfo"]) -> MetaOapg.properties.extInfo: ... + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "type", "value", "comment", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["diffs"]) -> typing.Union['OpenItemChangeSets', schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["extInfo"]) -> typing.Union[MetaOapg.properties.extInfo, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespace", "diffs", "extInfo", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["key", "type", "value", "comment", ], str]): return super().get_item_oapg(name) def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], - namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, - diffs: typing.Union['OpenItemChangeSets', schemas.Unset] = schemas.unset, - extInfo: typing.Union[MetaOapg.properties.extInfo, str, schemas.Unset] = schemas.unset, + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenItemDiffs': + ) -> 'OpenCreateItemDTO': return super().__new__( cls, *_args, - namespace=namespace, - diffs=diffs, - extInfo=extInfo, + key=key, + type=type, + value=value, + comment=comment, _configuration=_configuration, **kwargs, ) - -from apollo_openapi.model.open_item_change_sets import OpenItemChangeSets -from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_create_namespace_dto.py b/python/apollo_openapi/model/open_create_namespace_dto.py new file mode 100644 index 0000000..753551e --- /dev/null +++ b/python/apollo_openapi/model/open_create_namespace_dto.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenCreateNamespaceDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + """ + + + class MetaOapg: + + class properties: + appId = schemas.StrSchema + env = schemas.StrSchema + clusterName = schemas.StrSchema + appNamespaceName = schemas.StrSchema + __annotations__ = { + "appId": appId, + "env": env, + "clusterName": clusterName, + "appNamespaceName": appNamespaceName, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appNamespaceName"]) -> MetaOapg.properties.appNamespaceName: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "appNamespaceName", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appNamespaceName"]) -> typing.Union[MetaOapg.properties.appNamespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "appNamespaceName", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + appNamespaceName: typing.Union[MetaOapg.properties.appNamespaceName, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenCreateNamespaceDTO': + return super().__new__( + cls, + *_args, + appId=appId, + env=env, + clusterName=clusterName, + appNamespaceName=appNamespaceName, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_create_namespace_dto.pyi b/python/apollo_openapi/model/open_create_namespace_dto.pyi new file mode 100644 index 0000000..753551e --- /dev/null +++ b/python/apollo_openapi/model/open_create_namespace_dto.pyi @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenCreateNamespaceDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + """ + + + class MetaOapg: + + class properties: + appId = schemas.StrSchema + env = schemas.StrSchema + clusterName = schemas.StrSchema + appNamespaceName = schemas.StrSchema + __annotations__ = { + "appId": appId, + "env": env, + "clusterName": clusterName, + "appNamespaceName": appNamespaceName, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appNamespaceName"]) -> MetaOapg.properties.appNamespaceName: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "appNamespaceName", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appNamespaceName"]) -> typing.Union[MetaOapg.properties.appNamespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "appNamespaceName", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + appNamespaceName: typing.Union[MetaOapg.properties.appNamespaceName, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenCreateNamespaceDTO': + return super().__new__( + cls, + *_args, + appId=appId, + env=env, + clusterName=clusterName, + appNamespaceName=appNamespaceName, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_gray_release_rule_dto.py b/python/apollo_openapi/model/open_gray_release_rule_dto.py index 3ebb6ec..b25395e 100644 --- a/python/apollo_openapi/model/open_gray_release_rule_dto.py +++ b/python/apollo_openapi/model/open_gray_release_rule_dto.py @@ -54,6 +54,7 @@ class ruleItems( class MetaOapg: + unique_items = True @staticmethod def items() -> typing.Type['OpenGrayReleaseRuleItemDTO']: diff --git a/python/apollo_openapi/model/open_gray_release_rule_item_dto.py b/python/apollo_openapi/model/open_gray_release_rule_item_dto.py index b3c93ea..f4561a1 100644 --- a/python/apollo_openapi/model/open_gray_release_rule_item_dto.py +++ b/python/apollo_openapi/model/open_gray_release_rule_item_dto.py @@ -47,6 +47,7 @@ class clientIpList( class MetaOapg: + unique_items = True items = schemas.StrSchema def __new__( @@ -70,6 +71,7 @@ class clientLabelList( class MetaOapg: + unique_items = True items = schemas.StrSchema def __new__( diff --git a/python/apollo_openapi/model/open_item_diff_dto.py b/python/apollo_openapi/model/open_item_diff_dto.py new file mode 100644 index 0000000..2e9e1bf --- /dev/null +++ b/python/apollo_openapi/model/open_item_diff_dto.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenItemDiffDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + code = schemas.IntSchema + message = schemas.StrSchema + + @staticmethod + def namespace() -> typing.Type['OpenNamespaceIdentifier']: + return OpenNamespaceIdentifier + + + class createItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'createItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class deleteItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'deleteItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class updateItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'updateItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "code": code, + "message": message, + "namespace": namespace, + "createItems": createItems, + "deleteItems": deleteItems, + "updateItems": updateItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["createItems"]) -> MetaOapg.properties.createItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["deleteItems"]) -> MetaOapg.properties.deleteItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updateItems"]) -> MetaOapg.properties.updateItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "namespace", "createItems", "deleteItems", "updateItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["createItems"]) -> typing.Union[MetaOapg.properties.createItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["deleteItems"]) -> typing.Union[MetaOapg.properties.deleteItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updateItems"]) -> typing.Union[MetaOapg.properties.updateItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "namespace", "createItems", "deleteItems", "updateItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, + message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, + namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, + createItems: typing.Union[MetaOapg.properties.createItems, list, tuple, schemas.Unset] = schemas.unset, + deleteItems: typing.Union[MetaOapg.properties.deleteItems, list, tuple, schemas.Unset] = schemas.unset, + updateItems: typing.Union[MetaOapg.properties.updateItems, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemDiffDTO': + return super().__new__( + cls, + *_args, + code=code, + message=message, + namespace=namespace, + createItems=createItems, + deleteItems=deleteItems, + updateItems=updateItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_item_diff_dto.pyi b/python/apollo_openapi/model/open_item_diff_dto.pyi new file mode 100644 index 0000000..2e9e1bf --- /dev/null +++ b/python/apollo_openapi/model/open_item_diff_dto.pyi @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenItemDiffDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + code = schemas.IntSchema + message = schemas.StrSchema + + @staticmethod + def namespace() -> typing.Type['OpenNamespaceIdentifier']: + return OpenNamespaceIdentifier + + + class createItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'createItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class deleteItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'deleteItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + + + class updateItems( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenItemDTO']: + return OpenItemDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'updateItems': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenItemDTO': + return super().__getitem__(i) + __annotations__ = { + "code": code, + "message": message, + "namespace": namespace, + "createItems": createItems, + "deleteItems": deleteItems, + "updateItems": updateItems, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["createItems"]) -> MetaOapg.properties.createItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["deleteItems"]) -> MetaOapg.properties.deleteItems: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updateItems"]) -> MetaOapg.properties.updateItems: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "namespace", "createItems", "deleteItems", "updateItems", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["createItems"]) -> typing.Union[MetaOapg.properties.createItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["deleteItems"]) -> typing.Union[MetaOapg.properties.deleteItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updateItems"]) -> typing.Union[MetaOapg.properties.updateItems, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "namespace", "createItems", "deleteItems", "updateItems", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, + message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, + namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, + createItems: typing.Union[MetaOapg.properties.createItems, list, tuple, schemas.Unset] = schemas.unset, + deleteItems: typing.Union[MetaOapg.properties.deleteItems, list, tuple, schemas.Unset] = schemas.unset, + updateItems: typing.Union[MetaOapg.properties.updateItems, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemDiffDTO': + return super().__new__( + cls, + *_args, + code=code, + message=message, + namespace=namespace, + createItems=createItems, + deleteItems=deleteItems, + updateItems=updateItems, + _configuration=_configuration, + **kwargs, + ) + +from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_item_dto.py b/python/apollo_openapi/model/open_item_dto.py index 4375c0b..32baacb 100644 --- a/python/apollo_openapi/model/open_item_dto.py +++ b/python/apollo_openapi/model/open_item_dto.py @@ -31,120 +31,135 @@ class OpenItemDTO( Do not edit the class manually. - Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + Apollo配置项核心数据对象,仅包含键值及基础审计信息 """ class MetaOapg: class properties: + key = schemas.StrSchema + value = schemas.StrSchema + type = schemas.IntSchema + comment = schemas.StrSchema + + @staticmethod + def extendInfo() -> typing.Type['OpenItemExtendDTO']: + return OpenItemExtendDTO dataChangeCreatedBy = schemas.StrSchema dataChangeLastModifiedBy = schemas.StrSchema dataChangeCreatedTime = schemas.StrSchema dataChangeLastModifiedTime = schemas.StrSchema - key = schemas.StrSchema - type = schemas.IntSchema - value = schemas.StrSchema - comment = schemas.StrSchema __annotations__ = { + "key": key, + "value": value, + "type": type, + "comment": comment, + "extendInfo": extendInfo, "dataChangeCreatedBy": dataChangeCreatedBy, "dataChangeLastModifiedBy": dataChangeLastModifiedBy, "dataChangeCreatedTime": dataChangeCreatedTime, "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "key": key, - "type": type, - "value": value, - "comment": comment, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + def __getitem__(self, name: typing_extensions.Literal["extendInfo"]) -> 'OpenItemExtendDTO': ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "extendInfo", "dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenItemExtendDTO', schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "extendInfo", "dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], str]): return super().get_item_oapg(name) def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + extendInfo: typing.Union['OpenItemExtendDTO', schemas.Unset] = schemas.unset, dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, - key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, - value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OpenItemDTO': return super().__new__( cls, *_args, + key=key, + value=value, + type=type, + comment=comment, + extendInfo=extendInfo, dataChangeCreatedBy=dataChangeCreatedBy, dataChangeLastModifiedBy=dataChangeLastModifiedBy, dataChangeCreatedTime=dataChangeCreatedTime, dataChangeLastModifiedTime=dataChangeLastModifiedTime, - key=key, - type=type, - value=value, - comment=comment, _configuration=_configuration, **kwargs, ) + +from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO diff --git a/python/apollo_openapi/model/open_item_dto.pyi b/python/apollo_openapi/model/open_item_dto.pyi index 4375c0b..32baacb 100644 --- a/python/apollo_openapi/model/open_item_dto.pyi +++ b/python/apollo_openapi/model/open_item_dto.pyi @@ -31,120 +31,135 @@ class OpenItemDTO( Do not edit the class manually. - Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + Apollo配置项核心数据对象,仅包含键值及基础审计信息 """ class MetaOapg: class properties: + key = schemas.StrSchema + value = schemas.StrSchema + type = schemas.IntSchema + comment = schemas.StrSchema + + @staticmethod + def extendInfo() -> typing.Type['OpenItemExtendDTO']: + return OpenItemExtendDTO dataChangeCreatedBy = schemas.StrSchema dataChangeLastModifiedBy = schemas.StrSchema dataChangeCreatedTime = schemas.StrSchema dataChangeLastModifiedTime = schemas.StrSchema - key = schemas.StrSchema - type = schemas.IntSchema - value = schemas.StrSchema - comment = schemas.StrSchema __annotations__ = { + "key": key, + "value": value, + "type": type, + "comment": comment, + "extendInfo": extendInfo, "dataChangeCreatedBy": dataChangeCreatedBy, "dataChangeLastModifiedBy": dataChangeLastModifiedBy, "dataChangeCreatedTime": dataChangeCreatedTime, "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "key": key, - "type": type, - "value": value, - "comment": comment, } @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... + def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... + def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... + def __getitem__(self, name: typing_extensions.Literal["extendInfo"]) -> 'OpenItemExtendDTO': ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... + def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> MetaOapg.properties.dataChangeCreatedTime: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> MetaOapg.properties.dataChangeLastModifiedTime: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "extendInfo", "dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> typing.Union[MetaOapg.properties.key, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenItemExtendDTO', schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> typing.Union[MetaOapg.properties.value, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedTime"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedTime, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["dataChangeLastModifiedTime"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "key", "type", "value", "comment", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "extendInfo", "dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], str]): return super().get_item_oapg(name) def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], + key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, + value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, + type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, + comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, + extendInfo: typing.Union['OpenItemExtendDTO', schemas.Unset] = schemas.unset, dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, str, schemas.Unset] = schemas.unset, dataChangeCreatedTime: typing.Union[MetaOapg.properties.dataChangeCreatedTime, str, schemas.Unset] = schemas.unset, dataChangeLastModifiedTime: typing.Union[MetaOapg.properties.dataChangeLastModifiedTime, str, schemas.Unset] = schemas.unset, - key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, - value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OpenItemDTO': return super().__new__( cls, *_args, + key=key, + value=value, + type=type, + comment=comment, + extendInfo=extendInfo, dataChangeCreatedBy=dataChangeCreatedBy, dataChangeLastModifiedBy=dataChangeLastModifiedBy, dataChangeCreatedTime=dataChangeCreatedTime, dataChangeLastModifiedTime=dataChangeLastModifiedTime, - key=key, - type=type, - value=value, - comment=comment, _configuration=_configuration, **kwargs, ) + +from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO diff --git a/python/apollo_openapi/model/open_item_extend_dto.py b/python/apollo_openapi/model/open_item_extend_dto.py new file mode 100644 index 0000000..7a34434 --- /dev/null +++ b/python/apollo_openapi/model/open_item_extend_dto.py @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenItemExtendDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + """ + + + class MetaOapg: + + class properties: + namespaceId = schemas.Int64Schema + isModified = schemas.BoolSchema + isDeleted = schemas.BoolSchema + isNewlyAdded = schemas.BoolSchema + newValue = schemas.StrSchema + oldValue = schemas.StrSchema + __annotations__ = { + "namespaceId": namespaceId, + "isModified": isModified, + "isDeleted": isDeleted, + "isNewlyAdded": isNewlyAdded, + "newValue": newValue, + "oldValue": oldValue, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceId"]) -> MetaOapg.properties.namespaceId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isModified"]) -> MetaOapg.properties.isModified: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isDeleted"]) -> MetaOapg.properties.isDeleted: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isNewlyAdded"]) -> MetaOapg.properties.isNewlyAdded: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["newValue"]) -> MetaOapg.properties.newValue: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["oldValue"]) -> MetaOapg.properties.oldValue: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceId", "isModified", "isDeleted", "isNewlyAdded", "newValue", "oldValue", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceId"]) -> typing.Union[MetaOapg.properties.namespaceId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isModified"]) -> typing.Union[MetaOapg.properties.isModified, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isDeleted"]) -> typing.Union[MetaOapg.properties.isDeleted, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isNewlyAdded"]) -> typing.Union[MetaOapg.properties.isNewlyAdded, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["newValue"]) -> typing.Union[MetaOapg.properties.newValue, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["oldValue"]) -> typing.Union[MetaOapg.properties.oldValue, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceId", "isModified", "isDeleted", "isNewlyAdded", "newValue", "oldValue", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespaceId: typing.Union[MetaOapg.properties.namespaceId, decimal.Decimal, int, schemas.Unset] = schemas.unset, + isModified: typing.Union[MetaOapg.properties.isModified, bool, schemas.Unset] = schemas.unset, + isDeleted: typing.Union[MetaOapg.properties.isDeleted, bool, schemas.Unset] = schemas.unset, + isNewlyAdded: typing.Union[MetaOapg.properties.isNewlyAdded, bool, schemas.Unset] = schemas.unset, + newValue: typing.Union[MetaOapg.properties.newValue, str, schemas.Unset] = schemas.unset, + oldValue: typing.Union[MetaOapg.properties.oldValue, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemExtendDTO': + return super().__new__( + cls, + *_args, + namespaceId=namespaceId, + isModified=isModified, + isDeleted=isDeleted, + isNewlyAdded=isNewlyAdded, + newValue=newValue, + oldValue=oldValue, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_item_extend_dto.pyi b/python/apollo_openapi/model/open_item_extend_dto.pyi new file mode 100644 index 0000000..7a34434 --- /dev/null +++ b/python/apollo_openapi/model/open_item_extend_dto.pyi @@ -0,0 +1,130 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenItemExtendDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + """ + + + class MetaOapg: + + class properties: + namespaceId = schemas.Int64Schema + isModified = schemas.BoolSchema + isDeleted = schemas.BoolSchema + isNewlyAdded = schemas.BoolSchema + newValue = schemas.StrSchema + oldValue = schemas.StrSchema + __annotations__ = { + "namespaceId": namespaceId, + "isModified": isModified, + "isDeleted": isDeleted, + "isNewlyAdded": isNewlyAdded, + "newValue": newValue, + "oldValue": oldValue, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceId"]) -> MetaOapg.properties.namespaceId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isModified"]) -> MetaOapg.properties.isModified: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isDeleted"]) -> MetaOapg.properties.isDeleted: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isNewlyAdded"]) -> MetaOapg.properties.isNewlyAdded: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["newValue"]) -> MetaOapg.properties.newValue: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["oldValue"]) -> MetaOapg.properties.oldValue: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceId", "isModified", "isDeleted", "isNewlyAdded", "newValue", "oldValue", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceId"]) -> typing.Union[MetaOapg.properties.namespaceId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isModified"]) -> typing.Union[MetaOapg.properties.isModified, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isDeleted"]) -> typing.Union[MetaOapg.properties.isDeleted, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isNewlyAdded"]) -> typing.Union[MetaOapg.properties.isNewlyAdded, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["newValue"]) -> typing.Union[MetaOapg.properties.newValue, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["oldValue"]) -> typing.Union[MetaOapg.properties.oldValue, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceId", "isModified", "isDeleted", "isNewlyAdded", "newValue", "oldValue", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespaceId: typing.Union[MetaOapg.properties.namespaceId, decimal.Decimal, int, schemas.Unset] = schemas.unset, + isModified: typing.Union[MetaOapg.properties.isModified, bool, schemas.Unset] = schemas.unset, + isDeleted: typing.Union[MetaOapg.properties.isDeleted, bool, schemas.Unset] = schemas.unset, + isNewlyAdded: typing.Union[MetaOapg.properties.isNewlyAdded, bool, schemas.Unset] = schemas.unset, + newValue: typing.Union[MetaOapg.properties.newValue, str, schemas.Unset] = schemas.unset, + oldValue: typing.Union[MetaOapg.properties.oldValue, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenItemExtendDTO': + return super().__new__( + cls, + *_args, + namespaceId=namespaceId, + isModified=isModified, + isDeleted=isDeleted, + isNewlyAdded=isNewlyAdded, + newValue=newValue, + oldValue=oldValue, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_dto.py b/python/apollo_openapi/model/open_namespace_dto.py index ffa927f..4293609 100644 --- a/python/apollo_openapi/model/open_namespace_dto.py +++ b/python/apollo_openapi/model/open_namespace_dto.py @@ -74,6 +74,10 @@ def __new__( def __getitem__(self, i: int) -> 'OpenItemDTO': return super().__getitem__(i) + + @staticmethod + def extendInfo() -> typing.Type['OpenNamespaceExtendDTO']: + return OpenNamespaceExtendDTO __annotations__ = { "dataChangeCreatedBy": dataChangeCreatedBy, "dataChangeLastModifiedBy": dataChangeLastModifiedBy, @@ -86,6 +90,7 @@ def __getitem__(self, i: int) -> 'OpenItemDTO': "format": format, "isPublic": isPublic, "items": items, + "extendInfo": extendInfo, } @typing.overload @@ -121,10 +126,13 @@ def __getitem__(self, name: typing_extensions.Literal["isPublic"]) -> MetaOapg.p @typing.overload def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["extendInfo"]) -> 'OpenNamespaceExtendDTO': ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -162,10 +170,13 @@ def get_item_oapg(self, name: typing_extensions.Literal["isPublic"]) -> typing.U @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenNamespaceExtendDTO', schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], str]): return super().get_item_oapg(name) @@ -183,6 +194,7 @@ def __new__( format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, isPublic: typing.Union[MetaOapg.properties.isPublic, bool, schemas.Unset] = schemas.unset, items: typing.Union[MetaOapg.properties.items, list, tuple, schemas.Unset] = schemas.unset, + extendInfo: typing.Union['OpenNamespaceExtendDTO', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OpenNamespaceDTO': @@ -200,8 +212,10 @@ def __new__( format=format, isPublic=isPublic, items=items, + extendInfo=extendInfo, _configuration=_configuration, **kwargs, ) from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO diff --git a/python/apollo_openapi/model/open_namespace_dto.pyi b/python/apollo_openapi/model/open_namespace_dto.pyi index ffa927f..4293609 100644 --- a/python/apollo_openapi/model/open_namespace_dto.pyi +++ b/python/apollo_openapi/model/open_namespace_dto.pyi @@ -74,6 +74,10 @@ class OpenNamespaceDTO( def __getitem__(self, i: int) -> 'OpenItemDTO': return super().__getitem__(i) + + @staticmethod + def extendInfo() -> typing.Type['OpenNamespaceExtendDTO']: + return OpenNamespaceExtendDTO __annotations__ = { "dataChangeCreatedBy": dataChangeCreatedBy, "dataChangeLastModifiedBy": dataChangeLastModifiedBy, @@ -86,6 +90,7 @@ class OpenNamespaceDTO( "format": format, "isPublic": isPublic, "items": items, + "extendInfo": extendInfo, } @typing.overload @@ -121,10 +126,13 @@ class OpenNamespaceDTO( @typing.overload def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["extendInfo"]) -> 'OpenNamespaceExtendDTO': ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -162,10 +170,13 @@ class OpenNamespaceDTO( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenNamespaceExtendDTO', schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], str]): return super().get_item_oapg(name) @@ -183,6 +194,7 @@ class OpenNamespaceDTO( format: typing.Union[MetaOapg.properties.format, str, schemas.Unset] = schemas.unset, isPublic: typing.Union[MetaOapg.properties.isPublic, bool, schemas.Unset] = schemas.unset, items: typing.Union[MetaOapg.properties.items, list, tuple, schemas.Unset] = schemas.unset, + extendInfo: typing.Union['OpenNamespaceExtendDTO', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OpenNamespaceDTO': @@ -200,8 +212,10 @@ class OpenNamespaceDTO( format=format, isPublic=isPublic, items=items, + extendInfo=extendInfo, _configuration=_configuration, **kwargs, ) from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO diff --git a/python/apollo_openapi/model/rich_response_entity.py b/python/apollo_openapi/model/open_namespace_extend_dto.py similarity index 59% rename from python/apollo_openapi/model/rich_response_entity.py rename to python/apollo_openapi/model/open_namespace_extend_dto.py index e2b7b8f..3f7a300 100644 --- a/python/apollo_openapi/model/rich_response_entity.py +++ b/python/apollo_openapi/model/open_namespace_extend_dto.py @@ -23,85 +23,76 @@ from apollo_openapi import schemas # noqa: F401 -class RichResponseEntity( +class OpenNamespaceExtendDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - - A wrapper for a single response entity with code, message, and body """ class MetaOapg: - required = { - "code", - "message", - } class properties: - code = schemas.IntSchema - message = schemas.DictSchema - body = schemas.DictSchema + isConfigHidden = schemas.BoolSchema + parentAppId = schemas.StrSchema + itemModifiedCnt = schemas.IntSchema __annotations__ = { - "code": code, - "message": message, - "body": body, + "isConfigHidden": isConfigHidden, + "parentAppId": parentAppId, + "itemModifiedCnt": itemModifiedCnt, } - code: MetaOapg.properties.code - message: MetaOapg.properties.message - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + def __getitem__(self, name: typing_extensions.Literal["isConfigHidden"]) -> MetaOapg.properties.isConfigHidden: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + def __getitem__(self, name: typing_extensions.Literal["parentAppId"]) -> MetaOapg.properties.parentAppId: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["body"]) -> MetaOapg.properties.body: ... + def __getitem__(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> MetaOapg.properties.itemModifiedCnt: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + def get_item_oapg(self, name: typing_extensions.Literal["isConfigHidden"]) -> typing.Union[MetaOapg.properties.isConfigHidden, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + def get_item_oapg(self, name: typing_extensions.Literal["parentAppId"]) -> typing.Union[MetaOapg.properties.parentAppId, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["body"]) -> typing.Union[MetaOapg.properties.body, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> typing.Union[MetaOapg.properties.itemModifiedCnt, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): return super().get_item_oapg(name) def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], - message: typing.Union[MetaOapg.properties.message, dict, frozendict.frozendict, ], - body: typing.Union[MetaOapg.properties.body, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + isConfigHidden: typing.Union[MetaOapg.properties.isConfigHidden, bool, schemas.Unset] = schemas.unset, + parentAppId: typing.Union[MetaOapg.properties.parentAppId, str, schemas.Unset] = schemas.unset, + itemModifiedCnt: typing.Union[MetaOapg.properties.itemModifiedCnt, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RichResponseEntity': + ) -> 'OpenNamespaceExtendDTO': return super().__new__( cls, *_args, - code=code, - message=message, - body=body, + isConfigHidden=isConfigHidden, + parentAppId=parentAppId, + itemModifiedCnt=itemModifiedCnt, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/rich_response_entity.pyi b/python/apollo_openapi/model/open_namespace_extend_dto.pyi similarity index 59% rename from python/apollo_openapi/model/rich_response_entity.pyi rename to python/apollo_openapi/model/open_namespace_extend_dto.pyi index e2b7b8f..3f7a300 100644 --- a/python/apollo_openapi/model/rich_response_entity.pyi +++ b/python/apollo_openapi/model/open_namespace_extend_dto.pyi @@ -23,85 +23,76 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -class RichResponseEntity( +class OpenNamespaceExtendDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. - - A wrapper for a single response entity with code, message, and body """ class MetaOapg: - required = { - "code", - "message", - } class properties: - code = schemas.IntSchema - message = schemas.DictSchema - body = schemas.DictSchema + isConfigHidden = schemas.BoolSchema + parentAppId = schemas.StrSchema + itemModifiedCnt = schemas.IntSchema __annotations__ = { - "code": code, - "message": message, - "body": body, + "isConfigHidden": isConfigHidden, + "parentAppId": parentAppId, + "itemModifiedCnt": itemModifiedCnt, } - code: MetaOapg.properties.code - message: MetaOapg.properties.message - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + def __getitem__(self, name: typing_extensions.Literal["isConfigHidden"]) -> MetaOapg.properties.isConfigHidden: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + def __getitem__(self, name: typing_extensions.Literal["parentAppId"]) -> MetaOapg.properties.parentAppId: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["body"]) -> MetaOapg.properties.body: ... + def __getitem__(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> MetaOapg.properties.itemModifiedCnt: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... + def get_item_oapg(self, name: typing_extensions.Literal["isConfigHidden"]) -> typing.Union[MetaOapg.properties.isConfigHidden, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + def get_item_oapg(self, name: typing_extensions.Literal["parentAppId"]) -> typing.Union[MetaOapg.properties.parentAppId, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["body"]) -> typing.Union[MetaOapg.properties.body, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> typing.Union[MetaOapg.properties.itemModifiedCnt, schemas.Unset]: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "body", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): return super().get_item_oapg(name) def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, ], - message: typing.Union[MetaOapg.properties.message, dict, frozendict.frozendict, ], - body: typing.Union[MetaOapg.properties.body, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, + isConfigHidden: typing.Union[MetaOapg.properties.isConfigHidden, bool, schemas.Unset] = schemas.unset, + parentAppId: typing.Union[MetaOapg.properties.parentAppId, str, schemas.Unset] = schemas.unset, + itemModifiedCnt: typing.Union[MetaOapg.properties.itemModifiedCnt, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RichResponseEntity': + ) -> 'OpenNamespaceExtendDTO': return super().__new__( cls, *_args, - code=code, - message=message, - body=body, + isConfigHidden=isConfigHidden, + parentAppId=parentAppId, + itemModifiedCnt=itemModifiedCnt, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_namespace_lock_dto.py b/python/apollo_openapi/model/open_namespace_lock_dto.py index a44ca7b..439dce0 100644 --- a/python/apollo_openapi/model/open_namespace_lock_dto.py +++ b/python/apollo_openapi/model/open_namespace_lock_dto.py @@ -41,10 +41,12 @@ class properties: namespaceName = schemas.StrSchema isLocked = schemas.BoolSchema lockedBy = schemas.StrSchema + isEmergencyPublishAllowed = schemas.BoolSchema __annotations__ = { "namespaceName": namespaceName, "isLocked": isLocked, "lockedBy": lockedBy, + "isEmergencyPublishAllowed": isEmergencyPublishAllowed, } @typing.overload @@ -56,10 +58,13 @@ def __getitem__(self, name: typing_extensions.Literal["isLocked"]) -> MetaOapg.p @typing.overload def __getitem__(self, name: typing_extensions.Literal["lockedBy"]) -> MetaOapg.properties.lockedBy: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> MetaOapg.properties.isEmergencyPublishAllowed: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -73,10 +78,13 @@ def get_item_oapg(self, name: typing_extensions.Literal["isLocked"]) -> typing.U @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["lockedBy"]) -> typing.Union[MetaOapg.properties.lockedBy, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], str]): return super().get_item_oapg(name) @@ -86,6 +94,7 @@ def __new__( namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, isLocked: typing.Union[MetaOapg.properties.isLocked, bool, schemas.Unset] = schemas.unset, lockedBy: typing.Union[MetaOapg.properties.lockedBy, str, schemas.Unset] = schemas.unset, + isEmergencyPublishAllowed: typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OpenNamespaceLockDTO': @@ -95,6 +104,7 @@ def __new__( namespaceName=namespaceName, isLocked=isLocked, lockedBy=lockedBy, + isEmergencyPublishAllowed=isEmergencyPublishAllowed, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_namespace_lock_dto.pyi b/python/apollo_openapi/model/open_namespace_lock_dto.pyi index a44ca7b..439dce0 100644 --- a/python/apollo_openapi/model/open_namespace_lock_dto.pyi +++ b/python/apollo_openapi/model/open_namespace_lock_dto.pyi @@ -41,10 +41,12 @@ class OpenNamespaceLockDTO( namespaceName = schemas.StrSchema isLocked = schemas.BoolSchema lockedBy = schemas.StrSchema + isEmergencyPublishAllowed = schemas.BoolSchema __annotations__ = { "namespaceName": namespaceName, "isLocked": isLocked, "lockedBy": lockedBy, + "isEmergencyPublishAllowed": isEmergencyPublishAllowed, } @typing.overload @@ -56,10 +58,13 @@ class OpenNamespaceLockDTO( @typing.overload def __getitem__(self, name: typing_extensions.Literal["lockedBy"]) -> MetaOapg.properties.lockedBy: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> MetaOapg.properties.isEmergencyPublishAllowed: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -73,10 +78,13 @@ class OpenNamespaceLockDTO( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["lockedBy"]) -> typing.Union[MetaOapg.properties.lockedBy, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], str]): return super().get_item_oapg(name) @@ -86,6 +94,7 @@ class OpenNamespaceLockDTO( namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, isLocked: typing.Union[MetaOapg.properties.isLocked, bool, schemas.Unset] = schemas.unset, lockedBy: typing.Union[MetaOapg.properties.lockedBy, str, schemas.Unset] = schemas.unset, + isEmergencyPublishAllowed: typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OpenNamespaceLockDTO': @@ -95,6 +104,7 @@ class OpenNamespaceLockDTO( namespaceName=namespaceName, isLocked=isLocked, lockedBy=lockedBy, + isEmergencyPublishAllowed=isEmergencyPublishAllowed, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_namespace_sync_model.py b/python/apollo_openapi/model/open_namespace_sync_dto.py similarity index 98% rename from python/apollo_openapi/model/open_namespace_sync_model.py rename to python/apollo_openapi/model/open_namespace_sync_dto.py index f089a04..714ca68 100644 --- a/python/apollo_openapi/model/open_namespace_sync_model.py +++ b/python/apollo_openapi/model/open_namespace_sync_dto.py @@ -23,7 +23,7 @@ from apollo_openapi import schemas # noqa: F401 -class OpenNamespaceSyncModel( +class OpenNamespaceSyncDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -127,7 +127,7 @@ def __new__( syncItems: typing.Union[MetaOapg.properties.syncItems, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceSyncModel': + ) -> 'OpenNamespaceSyncDTO': return super().__new__( cls, *_args, diff --git a/python/apollo_openapi/model/open_namespace_sync_model.pyi b/python/apollo_openapi/model/open_namespace_sync_dto.pyi similarity index 98% rename from python/apollo_openapi/model/open_namespace_sync_model.pyi rename to python/apollo_openapi/model/open_namespace_sync_dto.pyi index f089a04..714ca68 100644 --- a/python/apollo_openapi/model/open_namespace_sync_model.pyi +++ b/python/apollo_openapi/model/open_namespace_sync_dto.pyi @@ -23,7 +23,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -class OpenNamespaceSyncModel( +class OpenNamespaceSyncDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -127,7 +127,7 @@ class OpenNamespaceSyncModel( syncItems: typing.Union[MetaOapg.properties.syncItems, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceSyncModel': + ) -> 'OpenNamespaceSyncDTO': return super().__new__( cls, *_args, diff --git a/python/apollo_openapi/model/open_namespace_usage_dto.py b/python/apollo_openapi/model/open_namespace_usage_dto.py new file mode 100644 index 0000000..5644b9a --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_usage_dto.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenNamespaceUsageDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + """ + + + class MetaOapg: + + class properties: + namespaceName = schemas.StrSchema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + envName = schemas.StrSchema + instanceCount = schemas.IntSchema + branchInstanceCount = schemas.IntSchema + linkedNamespaceCount = schemas.IntSchema + __annotations__ = { + "namespaceName": namespaceName, + "appId": appId, + "clusterName": clusterName, + "envName": envName, + "instanceCount": instanceCount, + "branchInstanceCount": branchInstanceCount, + "linkedNamespaceCount": linkedNamespaceCount, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["envName"]) -> MetaOapg.properties.envName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instanceCount"]) -> MetaOapg.properties.instanceCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["branchInstanceCount"]) -> MetaOapg.properties.branchInstanceCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["linkedNamespaceCount"]) -> MetaOapg.properties.linkedNamespaceCount: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "appId", "clusterName", "envName", "instanceCount", "branchInstanceCount", "linkedNamespaceCount", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["envName"]) -> typing.Union[MetaOapg.properties.envName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instanceCount"]) -> typing.Union[MetaOapg.properties.instanceCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["branchInstanceCount"]) -> typing.Union[MetaOapg.properties.branchInstanceCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["linkedNamespaceCount"]) -> typing.Union[MetaOapg.properties.linkedNamespaceCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "appId", "clusterName", "envName", "instanceCount", "branchInstanceCount", "linkedNamespaceCount", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + envName: typing.Union[MetaOapg.properties.envName, str, schemas.Unset] = schemas.unset, + instanceCount: typing.Union[MetaOapg.properties.instanceCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + branchInstanceCount: typing.Union[MetaOapg.properties.branchInstanceCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + linkedNamespaceCount: typing.Union[MetaOapg.properties.linkedNamespaceCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenNamespaceUsageDTO': + return super().__new__( + cls, + *_args, + namespaceName=namespaceName, + appId=appId, + clusterName=clusterName, + envName=envName, + instanceCount=instanceCount, + branchInstanceCount=branchInstanceCount, + linkedNamespaceCount=linkedNamespaceCount, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_namespace_usage_dto.pyi b/python/apollo_openapi/model/open_namespace_usage_dto.pyi new file mode 100644 index 0000000..5644b9a --- /dev/null +++ b/python/apollo_openapi/model/open_namespace_usage_dto.pyi @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + + +class OpenNamespaceUsageDTO( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + """ + + + class MetaOapg: + + class properties: + namespaceName = schemas.StrSchema + appId = schemas.StrSchema + clusterName = schemas.StrSchema + envName = schemas.StrSchema + instanceCount = schemas.IntSchema + branchInstanceCount = schemas.IntSchema + linkedNamespaceCount = schemas.IntSchema + __annotations__ = { + "namespaceName": namespaceName, + "appId": appId, + "clusterName": clusterName, + "envName": envName, + "instanceCount": instanceCount, + "branchInstanceCount": branchInstanceCount, + "linkedNamespaceCount": linkedNamespaceCount, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["envName"]) -> MetaOapg.properties.envName: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["instanceCount"]) -> MetaOapg.properties.instanceCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["branchInstanceCount"]) -> MetaOapg.properties.branchInstanceCount: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["linkedNamespaceCount"]) -> MetaOapg.properties.linkedNamespaceCount: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "appId", "clusterName", "envName", "instanceCount", "branchInstanceCount", "linkedNamespaceCount", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["envName"]) -> typing.Union[MetaOapg.properties.envName, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["instanceCount"]) -> typing.Union[MetaOapg.properties.instanceCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["branchInstanceCount"]) -> typing.Union[MetaOapg.properties.branchInstanceCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["linkedNamespaceCount"]) -> typing.Union[MetaOapg.properties.linkedNamespaceCount, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "appId", "clusterName", "envName", "instanceCount", "branchInstanceCount", "linkedNamespaceCount", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, + appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, + clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, + envName: typing.Union[MetaOapg.properties.envName, str, schemas.Unset] = schemas.unset, + instanceCount: typing.Union[MetaOapg.properties.instanceCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + branchInstanceCount: typing.Union[MetaOapg.properties.branchInstanceCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + linkedNamespaceCount: typing.Union[MetaOapg.properties.linkedNamespaceCount, decimal.Decimal, int, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'OpenNamespaceUsageDTO': + return super().__new__( + cls, + *_args, + namespaceName=namespaceName, + appId=appId, + clusterName=clusterName, + envName=envName, + instanceCount=instanceCount, + branchInstanceCount=branchInstanceCount, + linkedNamespaceCount=linkedNamespaceCount, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/models/__init__.py b/python/apollo_openapi/models/__init__.py index 0528e7d..32fa98f 100644 --- a/python/apollo_openapi/models/__init__.py +++ b/python/apollo_openapi/models/__init__.py @@ -14,13 +14,14 @@ from apollo_openapi.model.exception_response import ExceptionResponse from apollo_openapi.model.kv_entity import KVEntity from apollo_openapi.model.map_string import MapString -from apollo_openapi.model.multi_response_entity import MultiResponseEntity from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO from apollo_openapi.model.open_app_dto import OpenAppDTO from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO from apollo_openapi.model.open_cluster_dto import OpenClusterDTO from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO +from apollo_openapi.model.open_create_item_dto import OpenCreateItemDTO +from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO from apollo_openapi.model.open_env_cluster_dto import OpenEnvClusterDTO from apollo_openapi.model.open_env_cluster_info import OpenEnvClusterInfo from apollo_openapi.model.open_gray_release_rule_dto import OpenGrayReleaseRuleDTO @@ -30,16 +31,18 @@ from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO from apollo_openapi.model.open_item_change_sets import OpenItemChangeSets from apollo_openapi.model.open_item_dto import OpenItemDTO -from apollo_openapi.model.open_item_diffs import OpenItemDiffs +from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO +from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO from apollo_openapi.model.open_miss_env_dto import OpenMissEnvDTO from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO from apollo_openapi.model.open_organization_dto import OpenOrganizationDto from apollo_openapi.model.open_release_bo import OpenReleaseBO from apollo_openapi.model.open_release_dto import OpenReleaseDTO -from apollo_openapi.model.rich_response_entity import RichResponseEntity from apollo_openapi.model.string_to_string_bool_map import StringToStringBoolMap diff --git a/python/apollo_openapi/paths/__init__.py b/python/apollo_openapi/paths/__init__.py index 4940bd4..f3fd747 100644 --- a/python/apollo_openapi/paths/__init__.py +++ b/python/apollo_openapi/paths/__init__.py @@ -17,12 +17,11 @@ class PathValues(str, enum.Enum): OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY = "/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 = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE = "/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_BRANCHES_BRANCH_NAME_ITEMS = "/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_ITEMS_COMPARE = "/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_SYNC = "/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 = "/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_ITEMS_REVERT = "/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_DIFF = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS = "/openapi/v1/envs/{env}/apps/{appId}/clusters" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" @@ -38,17 +37,20 @@ class PathValues(str, enum.Enum): OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE = "/openapi/v1/envs/{env}/instances/by-release" OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE = "/openapi/v1/envs/{env}/instances/by-namespace" OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN = "/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in" + OPENAPI_V1_NAMESPACES = "/openapi/v1/namespaces" + OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" OPENAPI_V1_APPS_APP_ID_APPNAMESPACES = "/openapi/v1/apps/{appId}/appnamespaces" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" + OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" OPENAPI_V1_APPNAMESPACES = "/openapi/v1/appnamespaces" OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS = "/openapi/v1/apps/{appId}/namespaces/releases/status" OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" + OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" + OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" + OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" OPENAPI_V1_ORGANIZATIONS = "/openapi/v1/organizations" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" diff --git a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py index dcd2a9c..cb5c0a2 100644 --- a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py +++ b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py @@ -29,33 +29,6 @@ from . import path -# Query params -PublicOnlySchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'publicOnly': typing.Union[PublicOnlySchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_public_only = api_client.QueryParameter( - name="publicOnly", - style=api_client.ParameterStyle.FORM, - schema=PublicOnlySchema, - required=True, - explode=True, -) _auth = [ 'ApiKeyAuth', ] @@ -115,7 +88,6 @@ class BaseApi(api_client.Api): @typing.overload def _get_app_namespaces_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -128,7 +100,6 @@ def _get_app_namespaces_oapg( def _get_app_namespaces_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -137,7 +108,6 @@ def _get_app_namespaces_oapg( @typing.overload def _get_app_namespaces_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -149,7 +119,6 @@ def _get_app_namespaces_oapg( def _get_app_namespaces_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -161,22 +130,8 @@ def _get_app_namespaces_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) used_path = path.value - prefix_separator_iterator = None - for parameter in ( - request_query_public_only, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -217,7 +172,6 @@ class GetAppNamespaces(BaseApi): @typing.overload def get_app_namespaces( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -230,7 +184,6 @@ def get_app_namespaces( def get_app_namespaces( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -239,7 +192,6 @@ def get_app_namespaces( @typing.overload def get_app_namespaces( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -251,14 +203,12 @@ def get_app_namespaces( def get_app_namespaces( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): return self._get_app_namespaces_oapg( - query_params=query_params, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -272,7 +222,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -285,7 +234,6 @@ def get( def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -294,7 +242,6 @@ def get( @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -306,14 +253,12 @@ def get( def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): return self._get_app_namespaces_oapg( - query_params=query_params, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi index c06b1af..37c7827 100644 --- a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi @@ -27,33 +27,6 @@ from apollo_openapi import schemas # noqa: F401 from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -# Query params -PublicOnlySchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'publicOnly': typing.Union[PublicOnlySchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_public_only = api_client.QueryParameter( - name="publicOnly", - style=api_client.ParameterStyle.FORM, - schema=PublicOnlySchema, - required=True, - explode=True, -) class SchemaFor200ResponseBodyApplicationJson( @@ -107,7 +80,6 @@ class BaseApi(api_client.Api): @typing.overload def _get_app_namespaces_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -120,7 +92,6 @@ class BaseApi(api_client.Api): def _get_app_namespaces_oapg( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -129,7 +100,6 @@ class BaseApi(api_client.Api): @typing.overload def _get_app_namespaces_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -141,7 +111,6 @@ class BaseApi(api_client.Api): def _get_app_namespaces_oapg( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -153,22 +122,8 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) used_path = path.value - prefix_separator_iterator = None - for parameter in ( - request_query_public_only, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -209,7 +164,6 @@ class GetAppNamespaces(BaseApi): @typing.overload def get_app_namespaces( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -222,7 +176,6 @@ class GetAppNamespaces(BaseApi): def get_app_namespaces( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -231,7 +184,6 @@ class GetAppNamespaces(BaseApi): @typing.overload def get_app_namespaces( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -243,14 +195,12 @@ class GetAppNamespaces(BaseApi): def get_app_namespaces( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): return self._get_app_namespaces_oapg( - query_params=query_params, accept_content_types=accept_content_types, stream=stream, timeout=timeout, @@ -264,7 +214,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -277,7 +226,6 @@ class ApiForget(BaseApi): def get( self, skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -286,7 +234,6 @@ class ApiForget(BaseApi): @typing.overload def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, @@ -298,14 +245,12 @@ class ApiForget(BaseApi): def get( self, - query_params: RequestQueryParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): return self._get_app_namespaces_oapg( - query_params=query_params, accept_content_types=accept_content_types, stream=stream, timeout=timeout, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py index b375c00..f50c632 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py @@ -112,7 +112,7 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -124,7 +124,7 @@ def _get_app_namespaces_by_app_oapg( ]: ... @typing.overload - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -134,7 +134,7 @@ def _get_app_namespaces_by_app_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -146,7 +146,7 @@ def _get_app_namespaces_by_app_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -210,11 +210,11 @@ class instances return api_response -class GetAppNamespacesByApp(BaseApi): +class GetAppNamespacesByAppId(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -226,7 +226,7 @@ def get_app_namespaces_by_app( ]: ... @typing.overload - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -236,7 +236,7 @@ def get_app_namespaces_by_app( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -248,7 +248,7 @@ def get_app_namespaces_by_app( api_client.ApiResponseWithoutDeserialization, ]: ... - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -256,7 +256,7 @@ def get_app_namespaces_by_app( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespaces_by_app_oapg( + return self._get_app_namespaces_by_app_id_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -311,7 +311,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespaces_by_app_oapg( + return self._get_app_namespaces_by_app_id_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi index 1f53f82..a925600 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi @@ -104,7 +104,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -116,7 +116,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -126,7 +126,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -138,7 +138,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_app_namespaces_by_app_oapg( + def _get_app_namespaces_by_app_id_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -202,11 +202,11 @@ class BaseApi(api_client.Api): return api_response -class GetAppNamespacesByApp(BaseApi): +class GetAppNamespacesByAppId(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -218,7 +218,7 @@ class GetAppNamespacesByApp(BaseApi): ]: ... @typing.overload - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -228,7 +228,7 @@ class GetAppNamespacesByApp(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -240,7 +240,7 @@ class GetAppNamespacesByApp(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def get_app_namespaces_by_app( + def get_app_namespaces_by_app_id( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -248,7 +248,7 @@ class GetAppNamespacesByApp(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespaces_by_app_oapg( + return self._get_app_namespaces_by_app_id_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -303,7 +303,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespaces_by_app_oapg( + return self._get_app_namespaces_by_app_id_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py index 52faccd..cb6a364 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py @@ -30,6 +30,32 @@ from . import path +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( @@ -139,10 +165,11 @@ class ApiResponseFor403(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -153,10 +180,11 @@ def _create_namespace_oapg( ]: ... @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -168,11 +196,12 @@ def _create_namespace_oapg( @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -180,10 +209,11 @@ def _create_namespace_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -194,10 +224,11 @@ def _create_namespace_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -210,6 +241,7 @@ def _create_namespace_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -226,6 +258,19 @@ class instances for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -273,14 +318,15 @@ class instances return api_response -class CreateNamespace(BaseApi): +class CreateAppNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -291,10 +337,11 @@ def create_namespace( ]: ... @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -306,11 +353,12 @@ def create_namespace( @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -318,10 +366,11 @@ def create_namespace( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -332,18 +381,20 @@ def create_namespace( api_client.ApiResponseWithoutDeserialization, ]: ... - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._create_namespace_oapg( + return self._create_app_namespace_oapg( body=body, + query_params=query_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -361,6 +412,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -375,6 +427,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -391,6 +444,7 @@ def post( body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -402,6 +456,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -416,14 +471,16 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._create_namespace_oapg( + return self._create_app_namespace_oapg( body=body, + query_params=query_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi index cc303cb..68702d3 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi @@ -28,6 +28,32 @@ from apollo_openapi import schemas # noqa: F401 from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO from apollo_openapi.model.exception_response import ExceptionResponse +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( @@ -129,10 +155,11 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -143,10 +170,11 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -158,11 +186,12 @@ class BaseApi(api_client.Api): @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -170,10 +199,11 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -184,10 +214,11 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _create_namespace_oapg( + def _create_app_namespace_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -200,6 +231,7 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -216,6 +248,19 @@ class BaseApi(api_client.Api): for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -263,14 +308,15 @@ class BaseApi(api_client.Api): return api_response -class CreateNamespace(BaseApi): +class CreateAppNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -281,10 +327,11 @@ class CreateNamespace(BaseApi): ]: ... @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -296,11 +343,12 @@ class CreateNamespace(BaseApi): @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -308,10 +356,11 @@ class CreateNamespace(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -322,18 +371,20 @@ class CreateNamespace(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def create_namespace( + def create_app_namespace( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._create_namespace_oapg( + return self._create_app_namespace_oapg( body=body, + query_params=query_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -351,6 +402,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -365,6 +417,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -381,6 +434,7 @@ class ApiForpost(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -392,6 +446,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -406,14 +461,16 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._create_namespace_oapg( + return self._create_app_namespace_oapg( body=body, + query_params=query_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py index 404f22c..2aa3c5b 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -32,12 +31,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +50,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -91,31 +89,21 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) _status_code_to_response = { '200': _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) class BaseApi(api_client.Api): @@ -124,7 +112,6 @@ def _delete_app_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -138,7 +125,6 @@ def _delete_app_namespace_oapg( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -148,7 +134,6 @@ def _delete_app_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -161,7 +146,6 @@ def _delete_app_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -202,17 +186,11 @@ class instances serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -245,7 +223,6 @@ def delete_app_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -259,7 +236,6 @@ def delete_app_namespace( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -269,7 +245,6 @@ def delete_app_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -282,7 +257,6 @@ def delete_app_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -290,7 +264,6 @@ def delete_app_namespace( return self._delete_app_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -305,7 +278,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -319,7 +291,6 @@ def delete( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -329,7 +300,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -342,7 +312,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -350,7 +319,6 @@ def delete( return self._delete_app_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi index 09d9ae8..c36210f 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -30,12 +29,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -49,7 +48,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -86,27 +84,17 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', ) @@ -116,7 +104,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -130,7 +117,6 @@ class BaseApi(api_client.Api): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -140,7 +126,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -153,7 +138,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -194,17 +178,11 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -237,7 +215,6 @@ class DeleteAppNamespace(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -251,7 +228,6 @@ class DeleteAppNamespace(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -261,7 +237,6 @@ class DeleteAppNamespace(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -274,7 +249,6 @@ class DeleteAppNamespace(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -282,7 +256,6 @@ class DeleteAppNamespace(BaseApi): return self._delete_app_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -297,7 +270,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -311,7 +283,6 @@ class ApiFordelete(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -321,7 +292,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -334,7 +304,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -342,7 +311,6 @@ class ApiFordelete(BaseApi): return self._delete_app_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py index 4ddc16c..5e801e1 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py @@ -29,6 +29,32 @@ from . import path +# Query params +ExtendInfoSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema NamespaceNameSchema = schemas.StrSchema @@ -95,8 +121,9 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -107,9 +134,10 @@ def _get_app_namespace_oapg( ]: ... @typing.overload - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -117,8 +145,9 @@ def _get_app_namespace_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -129,8 +158,9 @@ def _get_app_namespace_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -143,6 +173,7 @@ def _get_app_namespace_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -160,6 +191,19 @@ class instances for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + prefix_separator_iterator = None + for parameter in ( + request_query_extend_info, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -194,12 +238,13 @@ class instances return api_response -class GetAppNamespace(BaseApi): +class FindAppNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_app_namespace( + def find_app_namespace( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -210,9 +255,10 @@ def get_app_namespace( ]: ... @typing.overload - def get_app_namespace( + def find_app_namespace( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -220,8 +266,9 @@ def get_app_namespace( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_app_namespace( + def find_app_namespace( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -232,15 +279,17 @@ def get_app_namespace( api_client.ApiResponseWithoutDeserialization, ]: ... - def get_app_namespace( + def find_app_namespace( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespace_oapg( + return self._find_app_namespace_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -255,6 +304,7 @@ class ApiForget(BaseApi): @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -268,6 +318,7 @@ def get( def get( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -277,6 +328,7 @@ def get( @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -289,13 +341,15 @@ def get( def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespace_oapg( + return self._find_app_namespace_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi index 892818f..554d868 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi @@ -27,6 +27,32 @@ from apollo_openapi import schemas # noqa: F401 from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +# Query params +ExtendInfoSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema NamespaceNameSchema = schemas.StrSchema @@ -87,8 +113,9 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -99,9 +126,10 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -109,8 +137,9 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -121,8 +150,9 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_app_namespace_oapg( + def _find_app_namespace_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -135,6 +165,7 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -152,6 +183,19 @@ class BaseApi(api_client.Api): for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + prefix_separator_iterator = None + for parameter in ( + request_query_extend_info, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -186,12 +230,13 @@ class BaseApi(api_client.Api): return api_response -class GetAppNamespace(BaseApi): +class FindAppNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_app_namespace( + def find_app_namespace( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -202,9 +247,10 @@ class GetAppNamespace(BaseApi): ]: ... @typing.overload - def get_app_namespace( + def find_app_namespace( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -212,8 +258,9 @@ class GetAppNamespace(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_app_namespace( + def find_app_namespace( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -224,15 +271,17 @@ class GetAppNamespace(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def get_app_namespace( + def find_app_namespace( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespace_oapg( + return self._find_app_namespace_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -247,6 +296,7 @@ class ApiForget(BaseApi): @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -260,6 +310,7 @@ class ApiForget(BaseApi): def get( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -269,6 +320,7 @@ class ApiForget(BaseApi): @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -281,13 +333,15 @@ class ApiForget(BaseApi): def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_namespace_oapg( + return self._find_app_namespace_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py new file mode 100644 index 0000000..dbdf5af --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py new file mode 100644 index 0000000..e996b06 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py @@ -0,0 +1,329 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO + +from . import path + +# Path params +AppIdSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceUsageDTO']: + return OpenNamespaceUsageDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_app_namespace_usage_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_app_namespace_usage_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_app_namespace_usage_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_app_namespace_usage_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询appnamespace使用情况(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindAppNamespaceUsage(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_app_namespace_usage( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_app_namespace_usage( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_app_namespace_usage( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_app_namespace_usage( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_app_namespace_usage_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_app_namespace_usage_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi new file mode 100644 index 0000000..4ad4af6 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi @@ -0,0 +1,321 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO + +# Path params +AppIdSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceUsageDTO']: + return OpenNamespaceUsageDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_app_namespace_usage_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_app_namespace_usage_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_app_namespace_usage_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_app_namespace_usage_oapg( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询appnamespace使用情况(new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindAppNamespaceUsage(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_app_namespace_usage( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_app_namespace_usage( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_app_namespace_usage( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_app_namespace_usage( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_app_namespace_usage_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_app_namespace_usage_oapg( + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py similarity index 79% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py index 17947d8..9103fac 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check import Api +# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_INTEGRITYCHECK +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py similarity index 95% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py index 8d9ef81..3f4e462 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py @@ -123,7 +123,7 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -135,7 +135,7 @@ def _check_namespace_integrity_oapg( ]: ... @typing.overload - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -145,7 +145,7 @@ def _check_namespace_integrity_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -157,7 +157,7 @@ def _check_namespace_integrity_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -166,7 +166,7 @@ def _check_namespace_integrity_oapg( skip_deserialization: bool = False, ): """ - 检查缺失的Namespace (new added) + 查找缺失的Namespace (new added) :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema class instances @@ -223,11 +223,11 @@ class instances return api_response -class CheckNamespaceIntegrity(BaseApi): +class FindMissingNamespaces(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def check_namespace_integrity( + def find_missing_namespaces( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -239,7 +239,7 @@ def check_namespace_integrity( ]: ... @typing.overload - def check_namespace_integrity( + def find_missing_namespaces( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -249,7 +249,7 @@ def check_namespace_integrity( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def check_namespace_integrity( + def find_missing_namespaces( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -261,7 +261,7 @@ def check_namespace_integrity( api_client.ApiResponseWithoutDeserialization, ]: ... - def check_namespace_integrity( + def find_missing_namespaces( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -269,7 +269,7 @@ def check_namespace_integrity( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._check_namespace_integrity_oapg( + return self._find_missing_namespaces_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -324,7 +324,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._check_namespace_integrity_oapg( + return self._find_missing_namespaces_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.pyi similarity index 95% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.pyi index ff69c77..2f9e55b 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.pyi @@ -115,7 +115,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -127,7 +127,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -137,7 +137,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -149,7 +149,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _check_namespace_integrity_oapg( + def _find_missing_namespaces_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -158,7 +158,7 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ): """ - 检查缺失的Namespace (new added) + 查找缺失的Namespace (new added) :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema class instances @@ -215,11 +215,11 @@ class BaseApi(api_client.Api): return api_response -class CheckNamespaceIntegrity(BaseApi): +class FindMissingNamespaces(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def check_namespace_integrity( + def find_missing_namespaces( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -231,7 +231,7 @@ class CheckNamespaceIntegrity(BaseApi): ]: ... @typing.overload - def check_namespace_integrity( + def find_missing_namespaces( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -241,7 +241,7 @@ class CheckNamespaceIntegrity(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def check_namespace_integrity( + def find_missing_namespaces( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -253,7 +253,7 @@ class CheckNamespaceIntegrity(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def check_namespace_integrity( + def find_missing_namespaces( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -261,7 +261,7 @@ class CheckNamespaceIntegrity(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._check_namespace_integrity_oapg( + return self._find_missing_namespaces_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -316,7 +316,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._check_namespace_integrity_oapg( + return self._find_missing_namespaces_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.py new file mode 100644 index 0000000..757fe8c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.py @@ -0,0 +1,365 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_missing_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_missing_namespaces_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_missing_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_missing_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建缺失的Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateMissingNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_missing_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_missing_namespaces( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_missing_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_missing_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_missing_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_missing_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi new file mode 100644 index 0000000..6e73666 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi @@ -0,0 +1,357 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) +# Path params +AppIdSchema = schemas.StrSchema +EnvSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'env': typing.Union[EnvSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_missing_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_missing_namespaces_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_missing_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_missing_namespaces_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建缺失的Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_app_id, + request_path_env, + request_path_cluster_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateMissingNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_missing_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_missing_namespaces( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_missing_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_missing_namespaces( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_missing_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_missing_namespaces_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py similarity index 77% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py index 0f923bc..78f2558 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links import Api +# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LINKS +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py similarity index 83% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py index 6312a68..43214ec 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -32,12 +31,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +50,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -107,40 +105,29 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) _status_code_to_response = { '200': _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) class BaseApi(api_client.Api): @typing.overload - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -149,22 +136,20 @@ def _delete_namespace_links_oapg( ]: ... @typing.overload - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -173,17 +158,16 @@ def _delete_namespace_links_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): """ - 删除关联的Namespace (new added) + 删除指定的Namespace (new added) :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema class instances @@ -220,17 +204,11 @@ class instances serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -255,15 +233,14 @@ class instances return api_response -class DeleteNamespaceLinks(BaseApi): +class DeleteNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def delete_namespace_links( + def delete_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -272,22 +249,20 @@ def delete_namespace_links( ]: ... @typing.overload - def delete_namespace_links( + def delete_namespace( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def delete_namespace_links( + def delete_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -296,19 +271,17 @@ def delete_namespace_links( api_client.ApiResponseWithoutDeserialization, ]: ... - def delete_namespace_links( + def delete_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._delete_namespace_links_oapg( + return self._delete_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -323,7 +296,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -337,7 +309,6 @@ def delete( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -347,7 +318,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -360,15 +330,13 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._delete_namespace_links_oapg( + return self._delete_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.pyi similarity index 83% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.pyi index d303251..186662f 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.pyi @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -30,12 +29,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -49,7 +48,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -102,37 +100,26 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', ) class BaseApi(api_client.Api): @typing.overload - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -141,22 +128,20 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -165,17 +150,16 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _delete_namespace_links_oapg( + def _delete_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): """ - 删除关联的Namespace (new added) + 删除指定的Namespace (new added) :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema class instances @@ -212,17 +196,11 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -247,15 +225,14 @@ class BaseApi(api_client.Api): return api_response -class DeleteNamespaceLinks(BaseApi): +class DeleteNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def delete_namespace_links( + def delete_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -264,22 +241,20 @@ class DeleteNamespaceLinks(BaseApi): ]: ... @typing.overload - def delete_namespace_links( + def delete_namespace( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def delete_namespace_links( + def delete_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -288,19 +263,17 @@ class DeleteNamespaceLinks(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def delete_namespace_links( + def delete_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._delete_namespace_links_oapg( + return self._delete_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -315,7 +288,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -329,7 +301,6 @@ class ApiFordelete(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -339,7 +310,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -352,15 +322,13 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._delete_namespace_links_oapg( + return self._delete_namespace_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py similarity index 73% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py index dc180fd..be1e916 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association import Api +# from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_PUBLICASSOCIATION +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py similarity index 89% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py index 03dcbe1..b532584 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py @@ -25,7 +25,7 @@ from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO from . import path @@ -82,7 +82,32 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceUsageDTO']: + return OpenNamespaceUsageDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': + return super().__getitem__(i) @dataclass @@ -111,7 +136,7 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -123,7 +148,7 @@ def _get_public_namespace_association_oapg( ]: ... @typing.overload - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -133,7 +158,7 @@ def _get_public_namespace_association_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -145,7 +170,7 @@ def _get_public_namespace_association_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -154,7 +179,7 @@ def _get_public_namespace_association_oapg( skip_deserialization: bool = False, ): """ - 获取关联的公共Namespace (new added) + 查询namespace使用情况(new added) :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema class instances @@ -212,11 +237,11 @@ class instances return api_response -class GetPublicNamespaceAssociation(BaseApi): +class FindNamespaceUsage(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_public_namespace_association( + def find_namespace_usage( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -228,7 +253,7 @@ def get_public_namespace_association( ]: ... @typing.overload - def get_public_namespace_association( + def find_namespace_usage( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -238,7 +263,7 @@ def get_public_namespace_association( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_public_namespace_association( + def find_namespace_usage( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -250,7 +275,7 @@ def get_public_namespace_association( api_client.ApiResponseWithoutDeserialization, ]: ... - def get_public_namespace_association( + def find_namespace_usage( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -258,7 +283,7 @@ def get_public_namespace_association( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_public_namespace_association_oapg( + return self._find_namespace_usage_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -313,7 +338,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_public_namespace_association_oapg( + return self._find_namespace_usage_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi similarity index 89% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi index 941fe9a..a7f6446 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO # Path params AppIdSchema = schemas.StrSchema @@ -77,7 +77,32 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenNamespaceUsageDTO']: + return OpenNamespaceUsageDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': + return super().__getitem__(i) @dataclass @@ -103,7 +128,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -115,7 +140,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -125,7 +150,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -137,7 +162,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_public_namespace_association_oapg( + def _find_namespace_usage_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -146,7 +171,7 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ): """ - 获取关联的公共Namespace (new added) + 查询namespace使用情况(new added) :param skip_deserialization: If true then api_response.response will be set but api_response.body and api_response.headers will not be deserialized into schema class instances @@ -204,11 +229,11 @@ class BaseApi(api_client.Api): return api_response -class GetPublicNamespaceAssociation(BaseApi): +class FindNamespaceUsage(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_public_namespace_association( + def find_namespace_usage( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -220,7 +245,7 @@ class GetPublicNamespaceAssociation(BaseApi): ]: ... @typing.overload - def get_public_namespace_association( + def find_namespace_usage( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -230,7 +255,7 @@ class GetPublicNamespaceAssociation(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_public_namespace_association( + def find_namespace_usage( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -242,7 +267,7 @@ class GetPublicNamespaceAssociation(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def get_public_namespace_association( + def find_namespace_usage( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -250,7 +275,7 @@ class GetPublicNamespaceAssociation(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_public_namespace_association_oapg( + return self._find_namespace_usage_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -305,7 +330,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_public_namespace_association_oapg( + return self._find_namespace_usage_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py index d602146..8e0927a 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py @@ -31,6 +31,7 @@ # Query params FillItemDetailSchema = schemas.BoolSchema +ExtendInfoSchema = schemas.BoolSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -40,6 +41,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], }, total=False ) @@ -56,6 +58,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) required=True, explode=True, ) +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -229,6 +237,7 @@ class instances prefix_separator_iterator = None for parameter in ( request_query_fill_item_detail, + request_query_extend_info, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi index 9084735..987da41 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi @@ -29,6 +29,7 @@ from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO # Query params FillItemDetailSchema = schemas.BoolSchema +ExtendInfoSchema = schemas.BoolSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -38,6 +39,7 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], }, total=False ) @@ -54,6 +56,12 @@ request_query_fill_item_detail = api_client.QueryParameter( required=True, explode=True, ) +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -221,6 +229,7 @@ class BaseApi(api_client.Api): prefix_separator_iterator = None for parameter in ( request_query_fill_item_detail, + request_query_extend_info, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py index 68822be..6fcd727 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py @@ -31,6 +31,7 @@ # Query params FillItemDetailSchema = schemas.BoolSchema +ExtendInfoSchema = schemas.BoolSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -40,6 +41,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], }, total=False ) @@ -56,6 +58,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) required=True, explode=True, ) +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -138,7 +146,7 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _load_namespace_oapg( + def _find_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -151,7 +159,7 @@ def _load_namespace_oapg( ]: ... @typing.overload - def _load_namespace_oapg( + def _find_namespace_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -162,7 +170,7 @@ def _load_namespace_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _load_namespace_oapg( + def _find_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -175,7 +183,7 @@ def _load_namespace_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _load_namespace_oapg( + def _find_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -213,6 +221,7 @@ class instances prefix_separator_iterator = None for parameter in ( request_query_fill_item_detail, + request_query_extend_info, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: @@ -257,11 +266,11 @@ class instances return api_response -class LoadNamespace(BaseApi): +class FindNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def load_namespace( + def find_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -274,7 +283,7 @@ def load_namespace( ]: ... @typing.overload - def load_namespace( + def find_namespace( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -285,7 +294,7 @@ def load_namespace( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def load_namespace( + def find_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -298,7 +307,7 @@ def load_namespace( api_client.ApiResponseWithoutDeserialization, ]: ... - def load_namespace( + def find_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -307,7 +316,7 @@ def load_namespace( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._load_namespace_oapg( + return self._find_namespace_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, @@ -367,7 +376,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._load_namespace_oapg( + return self._find_namespace_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi index 09bc0b9..ff06d04 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi @@ -29,6 +29,7 @@ from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO # Query params FillItemDetailSchema = schemas.BoolSchema +ExtendInfoSchema = schemas.BoolSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -38,6 +39,7 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], }, total=False ) @@ -54,6 +56,12 @@ request_query_fill_item_detail = api_client.QueryParameter( required=True, explode=True, ) +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -130,7 +138,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _load_namespace_oapg( + def _find_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -143,7 +151,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _load_namespace_oapg( + def _find_namespace_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -154,7 +162,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _load_namespace_oapg( + def _find_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -167,7 +175,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _load_namespace_oapg( + def _find_namespace_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -205,6 +213,7 @@ class BaseApi(api_client.Api): prefix_separator_iterator = None for parameter in ( request_query_fill_item_detail, + request_query_extend_info, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: @@ -249,11 +258,11 @@ class BaseApi(api_client.Api): return api_response -class LoadNamespace(BaseApi): +class FindNamespace(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def load_namespace( + def find_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -266,7 +275,7 @@ class LoadNamespace(BaseApi): ]: ... @typing.overload - def load_namespace( + def find_namespace( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), @@ -277,7 +286,7 @@ class LoadNamespace(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def load_namespace( + def find_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -290,7 +299,7 @@ class LoadNamespace(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def load_namespace( + def find_namespace( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), @@ -299,7 +308,7 @@ class LoadNamespace(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._load_namespace_oapg( + return self._find_namespace_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, @@ -359,7 +368,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._load_namespace_oapg( + return self._find_namespace_oapg( query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py similarity index 71% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py index 9172a7e..9a93cdd 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update import Api +# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_BATCH_UPDATE +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py new file mode 100644 index 0000000..59bc514 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py @@ -0,0 +1,376 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +from . import path + +# Query params +ExtendInfoSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_public_namespace_for_associated_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_public_namespace_for_associated_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_public_namespace_for_associated_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_public_namespace_for_associated_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询关联Namespace对应的公共Namespace详情 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_extend_info, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindPublicNamespaceForAssociatedNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_public_namespace_for_associated_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_public_namespace_for_associated_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_public_namespace_for_associated_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_public_namespace_for_associated_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_public_namespace_for_associated_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_public_namespace_for_associated_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi new file mode 100644 index 0000000..c77a84e --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi @@ -0,0 +1,368 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO + +# Query params +ExtendInfoSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, str, ], + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_env = api_client.PathParameter( + name="env", + style=api_client.ParameterStyle.SIMPLE, + schema=EnvSchema, + required=True, +) +request_path_app_id = api_client.PathParameter( + name="appId", + style=api_client.ParameterStyle.SIMPLE, + schema=AppIdSchema, + required=True, +) +request_path_cluster_name = api_client.PathParameter( + name="clusterName", + style=api_client.ParameterStyle.SIMPLE, + schema=ClusterNameSchema, + required=True, +) +request_path_namespace_name = api_client.PathParameter( + name="namespaceName", + style=api_client.ParameterStyle.SIMPLE, + schema=NamespaceNameSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _find_public_namespace_for_associated_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _find_public_namespace_for_associated_namespace_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _find_public_namespace_for_associated_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _find_public_namespace_for_associated_namespace_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询关联Namespace对应的公共Namespace详情 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + request_path_app_id, + request_path_cluster_name, + request_path_namespace_name, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_extend_info, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class FindPublicNamespaceForAssociatedNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def find_public_namespace_for_associated_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def find_public_namespace_for_associated_namespace( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def find_public_namespace_for_associated_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def find_public_namespace_for_associated_namespace( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_public_namespace_for_associated_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._find_public_namespace_for_associated_namespace_oapg( + query_params=query_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py index 4355516..4765ab9 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py @@ -30,6 +30,32 @@ from . import path +# Query params +ExtendInfoSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -134,6 +160,7 @@ class BaseApi(api_client.Api): @typing.overload def _find_branch_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,6 +174,7 @@ def _find_branch_oapg( def _find_branch_oapg( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -156,6 +184,7 @@ def _find_branch_oapg( @typing.overload def _find_branch_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -168,6 +197,7 @@ def _find_branch_oapg( def _find_branch_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -180,6 +210,7 @@ def _find_branch_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -199,6 +230,19 @@ class instances for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + prefix_separator_iterator = None + for parameter in ( + request_query_extend_info, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -239,6 +283,7 @@ class FindBranch(BaseApi): @typing.overload def find_branch( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -252,6 +297,7 @@ def find_branch( def find_branch( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -261,6 +307,7 @@ def find_branch( @typing.overload def find_branch( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,6 +320,7 @@ def find_branch( def find_branch( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -280,6 +328,7 @@ def find_branch( skip_deserialization: bool = False, ): return self._find_branch_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -294,6 +343,7 @@ class ApiForget(BaseApi): @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -307,6 +357,7 @@ def get( def get( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -316,6 +367,7 @@ def get( @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -328,6 +380,7 @@ def get( def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -335,6 +388,7 @@ def get( skip_deserialization: bool = False, ): return self._find_branch_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi index 6a367c4..76a38d0 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi @@ -28,6 +28,32 @@ from apollo_openapi import schemas # noqa: F401 from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO from apollo_openapi.model.exception_response import ExceptionResponse +# Query params +ExtendInfoSchema = schemas.BoolSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_extend_info = api_client.QueryParameter( + name="extendInfo", + style=api_client.ParameterStyle.FORM, + schema=ExtendInfoSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -125,6 +151,7 @@ class BaseApi(api_client.Api): @typing.overload def _find_branch_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -138,6 +165,7 @@ class BaseApi(api_client.Api): def _find_branch_oapg( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -147,6 +175,7 @@ class BaseApi(api_client.Api): @typing.overload def _find_branch_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -159,6 +188,7 @@ class BaseApi(api_client.Api): def _find_branch_oapg( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -171,6 +201,7 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -190,6 +221,19 @@ class BaseApi(api_client.Api): for k, v in _path_params.items(): used_path = used_path.replace('{%s}' % k, v) + prefix_separator_iterator = None + for parameter in ( + request_query_extend_info, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + _headers = HTTPHeaderDict() # TODO add cookie handling if accept_content_types: @@ -230,6 +274,7 @@ class FindBranch(BaseApi): @typing.overload def find_branch( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -243,6 +288,7 @@ class FindBranch(BaseApi): def find_branch( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -252,6 +298,7 @@ class FindBranch(BaseApi): @typing.overload def find_branch( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -264,6 +311,7 @@ class FindBranch(BaseApi): def find_branch( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -271,6 +319,7 @@ class FindBranch(BaseApi): skip_deserialization: bool = False, ): return self._find_branch_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -285,6 +334,7 @@ class ApiForget(BaseApi): @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -298,6 +348,7 @@ class ApiForget(BaseApi): def get( self, skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -307,6 +358,7 @@ class ApiForget(BaseApi): @typing.overload def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -319,6 +371,7 @@ class ApiForget(BaseApi): def get( self, + query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -326,6 +379,7 @@ class ApiForget(BaseApi): skip_deserialization: bool = False, ): return self._find_branch_oapg( + query_params=query_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py index 3722b97..eb14338 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py @@ -34,12 +34,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -53,7 +53,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi index f5579e8..a78e26b 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi @@ -32,12 +32,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +51,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py index 7968ef5..2715b0f 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -115,31 +114,21 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) _status_code_to_response = { '200': _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) class BaseApi(api_client.Api): @@ -148,7 +137,6 @@ def _delete_branch_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -162,7 +150,6 @@ def _delete_branch_oapg( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -172,7 +159,6 @@ def _delete_branch_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -185,7 +171,6 @@ def _delete_branch_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -229,17 +214,11 @@ class instances serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -272,7 +251,6 @@ def delete_branch( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -286,7 +264,6 @@ def delete_branch( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -296,7 +273,6 @@ def delete_branch( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -309,7 +285,6 @@ def delete_branch( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -317,7 +292,6 @@ def delete_branch( return self._delete_branch_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -332,7 +306,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -346,7 +319,6 @@ def delete( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -356,7 +328,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -369,7 +340,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -377,7 +347,6 @@ def delete( return self._delete_branch_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi index 9199418..7c0c88d 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -110,27 +109,17 @@ request_path_branch_name = api_client.PathParameter( schema=BranchNameSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', ) @@ -140,7 +129,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -154,7 +142,6 @@ class BaseApi(api_client.Api): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -164,7 +151,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -177,7 +163,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -221,17 +206,11 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -264,7 +243,6 @@ class DeleteBranch(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -278,7 +256,6 @@ class DeleteBranch(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -288,7 +265,6 @@ class DeleteBranch(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -301,7 +277,6 @@ class DeleteBranch(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -309,7 +284,6 @@ class DeleteBranch(BaseApi): return self._delete_branch_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -324,7 +298,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -338,7 +311,6 @@ class ApiFordelete(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -348,7 +320,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -361,7 +332,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -369,7 +339,6 @@ class ApiFordelete(BaseApi): return self._delete_branch_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.py similarity index 99% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.py index 769d11e..50aae89 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.py @@ -37,12 +37,12 @@ 'RequestRequiredQueryParams', { 'deleteBranch': typing.Union[DeleteBranchSchema, bool, ], - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -63,7 +63,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -297,7 +296,7 @@ class instances _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method='patch'.upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -411,11 +410,11 @@ def merge_branch( ) -class ApiForpatch(BaseApi): +class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., @@ -430,7 +429,7 @@ def patch( ]: ... @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -446,7 +445,7 @@ def patch( @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], @@ -459,7 +458,7 @@ def patch( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -474,7 +473,7 @@ def patch( api_client.ApiResponseWithoutDeserialization, ]: ... - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.pyi similarity index 99% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.pyi index 2aedba6..72efd70 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/patch.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.pyi @@ -35,12 +35,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { 'deleteBranch': typing.Union[DeleteBranchSchema, bool, ], - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -61,7 +61,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -289,7 +288,7 @@ class BaseApi(api_client.Api): _body = serialized_data['body'] response = self.api_client.call_api( resource_path=used_path, - method='patch'.upper(), + method='post'.upper(), headers=_headers, fields=_fields, body=_body, @@ -403,11 +402,11 @@ class MergeBranch(BaseApi): ) -class ApiForpatch(BaseApi): +class ApiForpost(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., @@ -422,7 +421,7 @@ class ApiForpatch(BaseApi): ]: ... @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -438,7 +437,7 @@ class ApiForpatch(BaseApi): @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], @@ -451,7 +450,7 @@ class ApiForpatch(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -466,7 +465,7 @@ class ApiForpatch(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def patch( + def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py index f8a38aa..7149cdf 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py @@ -165,7 +165,7 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -177,7 +177,7 @@ def _get_branch_items_oapg( ]: ... @typing.overload - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -187,7 +187,7 @@ def _get_branch_items_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -199,7 +199,7 @@ def _get_branch_items_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -267,11 +267,11 @@ class instances return api_response -class GetBranchItems(BaseApi): +class FindBranchItems(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_branch_items( + def find_branch_items( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -283,7 +283,7 @@ def get_branch_items( ]: ... @typing.overload - def get_branch_items( + def find_branch_items( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -293,7 +293,7 @@ def get_branch_items( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_branch_items( + def find_branch_items( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -305,7 +305,7 @@ def get_branch_items( api_client.ApiResponseWithoutDeserialization, ]: ... - def get_branch_items( + def find_branch_items( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -313,7 +313,7 @@ def get_branch_items( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_branch_items_oapg( + return self._find_branch_items_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -368,7 +368,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_branch_items_oapg( + return self._find_branch_items_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi index 0f0276e..0c00e7c 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi @@ -156,7 +156,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -168,7 +168,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -178,7 +178,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -190,7 +190,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_branch_items_oapg( + def _find_branch_items_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -258,11 +258,11 @@ class BaseApi(api_client.Api): return api_response -class GetBranchItems(BaseApi): +class FindBranchItems(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_branch_items( + def find_branch_items( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -274,7 +274,7 @@ class GetBranchItems(BaseApi): ]: ... @typing.overload - def get_branch_items( + def find_branch_items( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -284,7 +284,7 @@ class GetBranchItems(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_branch_items( + def find_branch_items( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -296,7 +296,7 @@ class GetBranchItems(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def get_branch_items( + def find_branch_items( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -304,7 +304,7 @@ class GetBranchItems(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_branch_items_oapg( + return self._find_branch_items_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -359,7 +359,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_branch_items_oapg( + return self._find_branch_items_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py index 9a6f208..2365d25 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py @@ -128,31 +128,21 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) _status_code_to_response = { '200': _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) class BaseApi(api_client.Api): @@ -163,7 +153,6 @@ def _update_branch_rules_oapg( content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -178,7 +167,6 @@ def _update_branch_rules_oapg( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -195,7 +183,6 @@ def _update_branch_rules_oapg( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -207,7 +194,6 @@ def _update_branch_rules_oapg( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -222,7 +208,6 @@ def _update_branch_rules_oapg( content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -269,9 +254,6 @@ class instances _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( @@ -324,7 +306,6 @@ def update_branch_rules( content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -339,7 +320,6 @@ def update_branch_rules( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -356,7 +336,6 @@ def update_branch_rules( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -368,7 +347,6 @@ def update_branch_rules( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -383,7 +361,6 @@ def update_branch_rules( content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -393,7 +370,6 @@ def update_branch_rules( query_params=query_params, path_params=path_params, content_type=content_type, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -410,7 +386,6 @@ def put( content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -425,7 +400,6 @@ def put( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -442,7 +416,6 @@ def put( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -454,7 +427,6 @@ def put( content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -469,7 +441,6 @@ def put( content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -479,7 +450,6 @@ def put( query_params=query_params, path_params=path_params, content_type=content_type, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi index 0427743..6a4e02a 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi @@ -123,27 +123,17 @@ request_body_open_gray_release_rule_dto = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', ) @@ -155,7 +145,6 @@ class BaseApi(api_client.Api): content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -170,7 +159,6 @@ class BaseApi(api_client.Api): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -187,7 +175,6 @@ class BaseApi(api_client.Api): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -199,7 +186,6 @@ class BaseApi(api_client.Api): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -214,7 +200,6 @@ class BaseApi(api_client.Api): content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -261,9 +246,6 @@ class BaseApi(api_client.Api): _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) if body is schemas.unset: raise exceptions.ApiValueError( @@ -316,7 +298,6 @@ class UpdateBranchRules(BaseApi): content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -331,7 +312,6 @@ class UpdateBranchRules(BaseApi): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -348,7 +328,6 @@ class UpdateBranchRules(BaseApi): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -360,7 +339,6 @@ class UpdateBranchRules(BaseApi): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -375,7 +353,6 @@ class UpdateBranchRules(BaseApi): content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -385,7 +362,6 @@ class UpdateBranchRules(BaseApi): query_params=query_params, path_params=path_params, content_type=content_type, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -402,7 +378,6 @@ class ApiForput(BaseApi): content_type: typing_extensions.Literal["application/json"] = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -417,7 +392,6 @@ class ApiForput(BaseApi): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -434,7 +408,6 @@ class ApiForput(BaseApi): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -446,7 +419,6 @@ class ApiForput(BaseApi): content_type: str = ..., query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -461,7 +433,6 @@ class ApiForput(BaseApi): content_type: str = 'application/json', query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -471,7 +442,6 @@ class ApiForput(BaseApi): query_params=query_params, path_params=path_params, content_type=content_type, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py index e632a99..0de0e73 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -115,31 +114,21 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) _status_code_to_response = { '200': _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) class BaseApi(api_client.Api): @@ -148,7 +137,6 @@ def _delete_item_by_encoded_key_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -162,7 +150,6 @@ def _delete_item_by_encoded_key_oapg( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -172,7 +159,6 @@ def _delete_item_by_encoded_key_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -185,7 +171,6 @@ def _delete_item_by_encoded_key_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -229,17 +214,11 @@ class instances serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -272,7 +251,6 @@ def delete_item_by_encoded_key( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -286,7 +264,6 @@ def delete_item_by_encoded_key( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -296,7 +273,6 @@ def delete_item_by_encoded_key( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -309,7 +285,6 @@ def delete_item_by_encoded_key( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -317,7 +292,6 @@ def delete_item_by_encoded_key( return self._delete_item_by_encoded_key_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -332,7 +306,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -346,7 +319,6 @@ def delete( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -356,7 +328,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -369,7 +340,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -377,7 +347,6 @@ def delete( return self._delete_item_by_encoded_key_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi index 77854ff..4f25b3a 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -110,27 +109,17 @@ request_path_key = api_client.PathParameter( schema=KeySchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', ) @@ -140,7 +129,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -154,7 +142,6 @@ class BaseApi(api_client.Api): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -164,7 +151,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -177,7 +163,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -221,17 +206,11 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -264,7 +243,6 @@ class DeleteItemByEncodedKey(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -278,7 +256,6 @@ class DeleteItemByEncodedKey(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -288,7 +265,6 @@ class DeleteItemByEncodedKey(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -301,7 +277,6 @@ class DeleteItemByEncodedKey(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -309,7 +284,6 @@ class DeleteItemByEncodedKey(BaseApi): return self._delete_item_by_encoded_key_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -324,7 +298,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -338,7 +311,6 @@ class ApiFordelete(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -348,7 +320,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -361,7 +332,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -369,7 +339,6 @@ class ApiFordelete(BaseApi): return self._delete_item_by_encoded_key_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py index e44f3f7..c2e639a 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py @@ -32,6 +32,7 @@ # Query params CreateIfNotExistsSchema = schemas.BoolSchema +OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -41,6 +42,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -57,6 +59,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) required=True, explode=True, ) +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -129,24 +137,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -318,6 +319,7 @@ class instances prefix_separator_iterator = None for parameter in ( request_query_create_if_not_exists, + request_query_operator, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi index dbd213b..b6841c9 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi @@ -30,6 +30,7 @@ from apollo_openapi.model.exception_response import ExceptionResponse # Query params CreateIfNotExistsSchema = schemas.BoolSchema +OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -39,6 +40,7 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -55,6 +57,12 @@ request_query_create_if_not_exists = api_client.QueryParameter( required=True, explode=True, ) +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -124,24 +132,17 @@ request_body_open_item_dto = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -307,6 +308,7 @@ class BaseApi(api_client.Api): prefix_separator_iterator = None for parameter in ( request_query_create_if_not_exists, + request_query_operator, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py index 02ec281..5426497 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py @@ -35,12 +35,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -54,7 +54,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi index 1303261..b4563f0 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi @@ -33,12 +33,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -52,7 +52,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.py similarity index 98% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.py index ddaf7c3..17ba9d5 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.py @@ -35,12 +35,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -54,7 +54,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -121,24 +120,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor403ResponseBodyApplicationJson = ExceptionResponse diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.pyi similarity index 98% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.pyi index 3a4014e..232f0f2 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/put.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.pyi @@ -33,12 +33,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -52,7 +52,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -116,24 +115,17 @@ request_body_open_namespace_text_model = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor403ResponseBodyApplicationJson = ExceptionResponse diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py similarity index 76% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py index f40d4bb..651390c 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync import Api +# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNC +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_DIFF diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py similarity index 96% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py index 08001ef..7050249 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py @@ -25,8 +25,8 @@ from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_item_diffs import OpenItemDiffs -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO +from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO from . import path @@ -81,10 +81,10 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) # body param -SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncDTO -request_body_open_namespace_sync_model = api_client.RequestBody( +request_body_open_namespace_sync_dto = api_client.RequestBody( content={ 'application/json': api_client.MediaType( schema=SchemaForRequestBodyApplicationJson), @@ -104,12 +104,12 @@ class SchemaFor200ResponseBodyApplicationJson( class MetaOapg: @staticmethod - def items() -> typing.Type['OpenItemDiffs']: - return OpenItemDiffs + def items() -> typing.Type['OpenItemDiffDTO']: + return OpenItemDiffDTO def __new__( cls, - _arg: typing.Union[typing.Tuple['OpenItemDiffs'], typing.List['OpenItemDiffs']], + _arg: typing.Union[typing.Tuple['OpenItemDiffDTO'], typing.List['OpenItemDiffDTO']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( @@ -118,7 +118,7 @@ def __new__( _configuration=_configuration, ) - def __getitem__(self, i: int) -> 'OpenItemDiffs': + def __getitem__(self, i: int) -> 'OpenItemDiffDTO': return super().__getitem__(i) @@ -249,7 +249,7 @@ class instances 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None - serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + serialized_data = request_body_open_namespace_sync_dto.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.pyi similarity index 96% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.pyi index 454f26b..fcd5058 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.pyi @@ -25,8 +25,8 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_item_diffs import OpenItemDiffs -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO +from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO # Path params AppIdSchema = schemas.StrSchema @@ -79,10 +79,10 @@ request_path_namespace_name = api_client.PathParameter( required=True, ) # body param -SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncDTO -request_body_open_namespace_sync_model = api_client.RequestBody( +request_body_open_namespace_sync_dto = api_client.RequestBody( content={ 'application/json': api_client.MediaType( schema=SchemaForRequestBodyApplicationJson), @@ -99,12 +99,12 @@ class SchemaFor200ResponseBodyApplicationJson( class MetaOapg: @staticmethod - def items() -> typing.Type['OpenItemDiffs']: - return OpenItemDiffs + def items() -> typing.Type['OpenItemDiffDTO']: + return OpenItemDiffDTO def __new__( cls, - _arg: typing.Union[typing.Tuple['OpenItemDiffs'], typing.List['OpenItemDiffs']], + _arg: typing.Union[typing.Tuple['OpenItemDiffDTO'], typing.List['OpenItemDiffDTO']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( @@ -113,7 +113,7 @@ class SchemaFor200ResponseBodyApplicationJson( _configuration=_configuration, ) - def __getitem__(self, i: int) -> 'OpenItemDiffs': + def __getitem__(self, i: int) -> 'OpenItemDiffDTO': return super().__getitem__(i) @@ -241,7 +241,7 @@ class BaseApi(api_client.Api): 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None - serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + serialized_data = request_body_open_namespace_sync_dto.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py index bc1afcb..945dff3 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -32,12 +31,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +50,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -115,31 +113,21 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) _status_code_to_response = { '200': _response_for_200, } -_all_accept_content_types = ( - 'application/json', -) class BaseApi(api_client.Api): @@ -148,7 +136,6 @@ def _delete_item_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -162,7 +149,6 @@ def _delete_item_oapg( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -172,7 +158,6 @@ def _delete_item_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -185,7 +170,6 @@ def _delete_item_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -229,17 +213,11 @@ class instances serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -272,7 +250,6 @@ def delete_item( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -286,7 +263,6 @@ def delete_item( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -296,7 +272,6 @@ def delete_item( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -309,7 +284,6 @@ def delete_item( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -317,7 +291,6 @@ def delete_item( return self._delete_item_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -332,7 +305,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -346,7 +318,6 @@ def delete( skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -356,7 +327,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -369,7 +339,6 @@ def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -377,7 +346,6 @@ def delete( return self._delete_item_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi index 6de5c8c..3ad59ae 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi @@ -9,7 +9,6 @@ from dataclasses import dataclass import typing_extensions import urllib3 -from urllib3._collections import HTTPHeaderDict from apollo_openapi import api_client, exceptions from datetime import date, datetime # noqa: F401 @@ -30,12 +29,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -49,7 +48,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -110,27 +108,17 @@ request_path_key = api_client.PathParameter( schema=KeySchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', ) @@ -140,7 +128,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -154,7 +141,6 @@ class BaseApi(api_client.Api): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -164,7 +150,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -177,7 +162,6 @@ class BaseApi(api_client.Api): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -221,17 +205,11 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) for serialized_value in serialized_data.values(): used_path += serialized_value - - _headers = HTTPHeaderDict() # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) response = self.api_client.call_api( resource_path=used_path, method='delete'.upper(), - headers=_headers, auth_settings=_auth, stream=stream, timeout=timeout, @@ -264,7 +242,6 @@ class DeleteItem(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -278,7 +255,6 @@ class DeleteItem(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -288,7 +264,6 @@ class DeleteItem(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -301,7 +276,6 @@ class DeleteItem(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -309,7 +283,6 @@ class DeleteItem(BaseApi): return self._delete_item_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -324,7 +297,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -338,7 +310,6 @@ class ApiFordelete(BaseApi): skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -348,7 +319,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -361,7 +331,6 @@ class ApiFordelete(BaseApi): self, query_params: RequestQueryParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -369,7 +338,6 @@ class ApiFordelete(BaseApi): return self._delete_item_oapg( query_params=query_params, path_params=path_params, - accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py index 0810909..a886cc2 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py @@ -32,6 +32,7 @@ # Query params CreateIfNotExistsSchema = schemas.BoolSchema +OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -41,6 +42,7 @@ RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -57,6 +59,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) required=True, explode=True, ) +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -129,24 +137,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -318,6 +319,7 @@ class instances prefix_separator_iterator = None for parameter in ( request_query_create_if_not_exists, + request_query_operator, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi index f845146..4a60a8f 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi @@ -30,6 +30,7 @@ from apollo_openapi.model.exception_response import ExceptionResponse # Query params CreateIfNotExistsSchema = schemas.BoolSchema +OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { @@ -39,6 +40,7 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -55,6 +57,12 @@ request_query_create_if_not_exists = api_client.QueryParameter( required=True, explode=True, ) +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) # Path params AppIdSchema = schemas.StrSchema EnvSchema = schemas.StrSchema @@ -124,24 +132,17 @@ request_body_open_item_dto = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -307,6 +308,7 @@ class BaseApi(api_client.Api): prefix_separator_iterator = None for parameter in ( request_query_create_if_not_exists, + request_query_operator, ): parameter_data = query_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py similarity index 74% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py index 252f74d..4a754f9 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert import Api +# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVERT +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py similarity index 97% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py index 6277298..9ce0897 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py @@ -34,12 +34,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -53,7 +53,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -109,24 +108,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.pyi similarity index 97% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.pyi index b399d6a..129777a 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.pyi @@ -32,12 +32,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +51,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -104,24 +103,17 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py similarity index 74% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py index e4c32e7..b6ee685 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate import Api +# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATE +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py similarity index 96% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py index 8cc50d6..1af1180 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py @@ -25,7 +25,7 @@ from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO from apollo_openapi.model.exception_response import ExceptionResponse from . import path @@ -35,12 +35,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -54,7 +54,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -108,10 +107,10 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): required=True, ) # body param -SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncDTO -request_body_open_namespace_sync_model = api_client.RequestBody( +request_body_open_namespace_sync_dto = api_client.RequestBody( content={ 'application/json': api_client.MediaType( schema=SchemaForRequestBodyApplicationJson), @@ -121,24 +120,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -310,7 +302,7 @@ class instances 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None - serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + serialized_data = request_body_open_namespace_sync_dto.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.pyi similarity index 96% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.pyi index e1780ca..9b3399c 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO from apollo_openapi.model.exception_response import ExceptionResponse # Query params @@ -33,12 +33,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -52,7 +52,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -106,34 +105,27 @@ request_path_namespace_name = api_client.PathParameter( required=True, ) # body param -SchemaForRequestBodyApplicationJson = OpenNamespaceSyncModel +SchemaForRequestBodyApplicationJson = OpenNamespaceSyncDTO -request_body_open_namespace_sync_model = api_client.RequestBody( +request_body_open_namespace_sync_dto = api_client.RequestBody( content={ 'application/json': api_client.MediaType( schema=SchemaForRequestBodyApplicationJson), }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -300,7 +292,7 @@ class BaseApi(api_client.Api): 'The required body parameter has an invalid value of: unset. Set a valid value instead') _fields = None _body = None - serialized_data = request_body_open_namespace_sync_model.serialize(body, content_type) + serialized_data = request_body_open_namespace_sync_dto.serialize(body, content_type) _headers.add('Content-Type', content_type) if 'fields' in serialized_data: _fields = serialized_data['fields'] diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py similarity index 74% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py index 22c445e..43d665e 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare import Api +# from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_COMPARE +path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py similarity index 95% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py index 0923c0b..adfb852 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py @@ -94,24 +94,17 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -143,7 +136,7 @@ class ApiResponseFor400(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., @@ -157,7 +150,7 @@ def _validate_items_oapg( ]: ... @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -172,7 +165,7 @@ def _validate_items_oapg( @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], @@ -184,7 +177,7 @@ def _validate_items_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -198,7 +191,7 @@ def _validate_items_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', @@ -280,11 +273,11 @@ class instances return api_response -class ValidateItems(BaseApi): +class SyntaxCheck(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., @@ -298,7 +291,7 @@ def validate_items( ]: ... @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -313,7 +306,7 @@ def validate_items( @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], @@ -325,7 +318,7 @@ def validate_items( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -339,7 +332,7 @@ def validate_items( api_client.ApiResponseWithoutDeserialization, ]: ... - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', @@ -349,7 +342,7 @@ def validate_items( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._validate_items_oapg( + return self._syntax_check_oapg( body=body, path_params=path_params, content_type=content_type, @@ -429,7 +422,7 @@ def post( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._validate_items_oapg( + return self._syntax_check_oapg( body=body, path_params=path_params, content_type=content_type, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.pyi similarity index 95% rename from python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.pyi index 5affcf3..8c2c9b7 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.pyi @@ -89,24 +89,17 @@ request_body_open_namespace_text_model = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor200(api_client.ApiResponse): response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] + body: schemas.Unset = schemas.unset headers: schemas.Unset = schemas.unset _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, ) SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @@ -134,7 +127,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., @@ -148,7 +141,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -163,7 +156,7 @@ class BaseApi(api_client.Api): @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], @@ -175,7 +168,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -189,7 +182,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _validate_items_oapg( + def _syntax_check_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', @@ -271,11 +264,11 @@ class BaseApi(api_client.Api): return api_response -class ValidateItems(BaseApi): +class SyntaxCheck(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., @@ -289,7 +282,7 @@ class ValidateItems(BaseApi): ]: ... @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -304,7 +297,7 @@ class ValidateItems(BaseApi): @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], skip_deserialization: typing_extensions.Literal[True], @@ -316,7 +309,7 @@ class ValidateItems(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = ..., @@ -330,7 +323,7 @@ class ValidateItems(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def validate_items( + def syntax_check( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: str = 'application/json', @@ -340,7 +333,7 @@ class ValidateItems(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._validate_items_oapg( + return self._syntax_check_oapg( body=body, path_params=path_params, content_type=content_type, @@ -420,7 +413,7 @@ class ApiForpost(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._validate_items_oapg( + return self._syntax_check_oapg( body=body, path_params=path_params, content_type=content_type, diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py index baaf657..3dacff7 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py @@ -32,12 +32,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +51,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi index 43e9cc1..f13c10b 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi @@ -30,12 +30,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -49,7 +49,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params diff --git a/python/apollo_openapi/paths/openapi_v1_namespaces/__init__.py b/python/apollo_openapi/paths/openapi_v1_namespaces/__init__.py new file mode 100644 index 0000000..e0f1bd3 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_namespaces/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_namespaces import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_NAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_namespaces/post.py b/python/apollo_openapi/paths/openapi_v1_namespaces/post.py new file mode 100644 index 0000000..d7b9aca --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_namespaces/post.py @@ -0,0 +1,387 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO + +from . import path + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) +# body param + + +class SchemaForRequestBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenCreateNamespaceDTO']: + return OpenCreateNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenCreateNamespaceDTO'], typing.List['OpenCreateNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaForRequestBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenCreateNamespaceDTO': + return super().__getitem__(i) + + +request_body_open_create_namespace_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) +_auth = [ + 'ApiKeyAuth', +] + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) +_status_code_to_response = { + '200': _response_for_200, +} + + +class BaseApi(api_client.Api): + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_create_namespace_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespaces_oapg( + body=body, + query_params=query_params, + content_type=content_type, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespaces_oapg( + body=body, + query_params=query_params, + content_type=content_type, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi b/python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi new file mode 100644 index 0000000..58cf02c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi @@ -0,0 +1,379 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO + +# Query params +OperatorSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'operator': typing.Union[OperatorSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_operator = api_client.QueryParameter( + name="operator", + style=api_client.ParameterStyle.FORM, + schema=OperatorSchema, + explode=True, +) +# body param + + +class SchemaForRequestBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenCreateNamespaceDTO']: + return OpenCreateNamespaceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenCreateNamespaceDTO'], typing.List['OpenCreateNamespaceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaForRequestBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenCreateNamespaceDTO': + return super().__getitem__(i) + + +request_body_open_create_namespace_dto = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + }, + required=True, +) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, +) + + +class BaseApi(api_client.Api): + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _create_namespaces_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 创建Namespace (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + used_path = path.value + + prefix_separator_iterator = None + for parameter in ( + request_query_operator, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + # TODO add cookie handling + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_open_create_namespace_dto.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='post'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class CreateNamespaces(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def create_namespaces( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespaces_oapg( + body=body, + query_params=query_params, + content_type=content_type, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForpost(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: typing_extensions.Literal["application/json"] = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = ..., + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def post( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], + content_type: str = 'application/json', + query_params: RequestQueryParams = frozendict.frozendict(), + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._create_namespaces_oapg( + body=body, + query_params=query_params, + content_type=content_type, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) diff --git a/python/docs/apis/tags/AppManagementApi.md b/python/docs/apis/tags/AppManagementApi.md index d42c138..c88e156 100644 --- a/python/docs/apis/tags/AppManagementApi.md +++ b/python/docs/apis/tags/AppManagementApi.md @@ -1223,7 +1223,7 @@ Class Name | Input Type | Accessed Type | Description | Notes 获取应用的环境集群信息 (original openapi) -GET /openapi/v1/apps/{appId}/envClusters +GET /openapi/v1/apps/{appId}/envclusters ### Example diff --git a/python/docs/apis/tags/AppNamespaceManagementApi.md b/python/docs/apis/tags/AppNamespaceManagementApi.md new file mode 100644 index 0000000..d610059 --- /dev/null +++ b/python/docs/apis/tags/AppNamespaceManagementApi.md @@ -0,0 +1,942 @@ + +# apollo_openapi.apis.tags.app_namespace_management_api.AppNamespaceManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_app_namespace**](#create_app_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) +[**delete_app_namespace**](#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) +[**find_app_namespace**](#find_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) +[**find_app_namespace_usage**](#find_app_namespace_usage) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) +[**get_app_namespaces**](#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) +[**get_app_namespaces_by_app_id**](#get_app_namespaces_by_app_id) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) +[**get_public_app_namespace_instances**](#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) + +# **create_app_namespace** + +> OpenAppNamespaceDTO create_app_namespace(app_idopen_app_namespace_dto) + +创建AppNamespace (original openapi) + +POST /openapi/v1/apps/{appId}/appnamespaces + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + query_params = { + } + body = OpenAppNamespaceDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + name="name_example", + app_id="app_id_example", + format="format_example", + is_public=True, + append_namespace_prefix=True, + comment="comment_example", + ) + try: + # 创建AppNamespace (original openapi) + api_response = api_instance.create_app_namespace( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->create_app_namespace: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenAppNamespaceDTO( + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + name="name_example", + app_id="app_id_example", + format="format_example", + is_public=True, + append_namespace_prefix=True, + comment="comment_example", + ) + try: + # 创建AppNamespace (original openapi) + api_response = api_instance.create_app_namespace( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->create_app_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | optional + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#create_app_namespace.ApiResponseFor200) | AppNamespace创建成功 +400 | [ApiResponseFor400](#create_app_namespace.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#create_app_namespace.ApiResponseFor403) | 权限不足 + +#### create_app_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | + + +#### create_app_namespace.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | + + +#### create_app_namespace.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **delete_app_namespace** + +> delete_app_namespace(app_idnamespace_name) + +删除AppNamespace (new added) + +DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + } + try: + # 删除AppNamespace (new added) + api_response = api_instance.delete_app_namespace( + path_params=path_params, + query_params=query_params, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->delete_app_namespace: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 删除AppNamespace (new added) + api_response = api_instance.delete_app_namespace( + path_params=path_params, + query_params=query_params, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->delete_app_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | optional + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#delete_app_namespace.ApiResponseFor200) | AppNamespace删除成功 + +#### delete_app_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_app_namespace** + +> OpenAppNamespaceDTO find_app_namespace(app_idnamespace_name) + +获取指定的AppNamespace (new added) + +GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + } + try: + # 获取指定的AppNamespace (new added) + api_response = api_instance.find_app_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->find_app_namespace: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'extendInfo': False, + } + try: + # 获取指定的AppNamespace (new added) + api_response = api_instance.find_app_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->find_app_namespace: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +extendInfo | ExtendInfoSchema | | optional + + +# ExtendInfoSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_app_namespace.ApiResponseFor200) | 成功获取AppNamespace + +#### find_app_namespace.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **find_app_namespace_usage** + +> [OpenNamespaceUsageDTO] find_app_namespace_usage(app_idnamespace_name) + +查询appnamespace使用情况(new added) + +GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'namespaceName': "namespaceName_example", + } + try: + # 查询appnamespace使用情况(new added) + api_response = api_instance.find_app_namespace_usage( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->find_app_namespace_usage: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#find_app_namespace_usage.ApiResponseFor200) | AppNamespaceUsage查询成功 + +#### find_app_namespace_usage.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app_namespaces** + +> [OpenAppNamespaceDTO] get_app_namespaces() + +获取所有公共AppNamespace (new added) + +GET /openapi/v1/appnamespaces/public + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example, this endpoint has no required or optional parameters + try: + # 获取所有公共AppNamespace (new added) + api_response = api_instance.get_app_namespaces() + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->get_app_namespaces: %s\n" % e) +``` +### Parameters +This endpoint does not need any parameter. + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app_namespaces.ApiResponseFor200) | + +#### get_app_namespaces.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_app_namespaces_by_app_id** + +> [OpenAppNamespaceDTO] get_app_namespaces_by_app_id(app_id) + +获取指定应用的AppNamespace (new added) + +GET /openapi/v1/apps/{appId}/appnamespaces + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + } + try: + # 获取指定应用的AppNamespace (new added) + api_response = api_instance.get_app_namespaces_by_app_id( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->get_app_namespaces_by_app_id: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_app_namespaces_by_app_id.ApiResponseFor200) | + +#### get_app_namespaces_by_app_id.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **get_public_app_namespace_instances** + +> [OpenNamespaceDTO] get_public_app_namespace_instances(envpublic_namespace_namepagesize) + +获取公共AppNamespace的所有实例 (new added) + +GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import app_namespace_management_api +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + 'publicNamespaceName': "publicNamespaceName_example", + } + query_params = { + 'page': 0, + 'size': 10, + } + try: + # 获取公共AppNamespace的所有实例 (new added) + api_response = api_instance.get_public_app_namespace_instances( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppNamespaceManagementApi->get_public_app_namespace_instances: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | +publicNamespaceName | PublicNamespaceNameSchema | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PublicNamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_public_app_namespace_instances.ApiResponseFor200) | 成功获取实例列表 + +#### get_public_app_namespace_instances.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/ItemManagementApi.md b/python/docs/apis/tags/ItemManagementApi.md index 6da7f23..ebf2d4a 100644 --- a/python/docs/apis/tags/ItemManagementApi.md +++ b/python/docs/apis/tags/ItemManagementApi.md @@ -5,28 +5,28 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**batch_update_items_by_text**](#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate | 通过文本批量修改配置项 (new added) -[**compare_items**](#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare | 对比命名空间配置差异 (new added) +[**batch_update_items_by_text**](#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) +[**compare_items**](#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) [**create_item**](#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) [**delete_item**](#delete_item) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) [**delete_item_by_encoded_key**](#delete_item_by_encoded_key) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) +[**find_branch_items**](#find_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) [**find_items_by_namespace**](#find_items_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) -[**get_branch_items**](#get_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) [**get_item**](#get_item) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 获取单个配置项 (original openapi) [**get_item_by_encoded_key**](#get_item_by_encoded_key) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过查询参数获取配置项(支持编码的key) (original openapi) -[**revert_items**](#revert_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert | 撤销配置项更改 (new added) -[**sync_items**](#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync | 同步配置项到多个命名空间 (new added) +[**revert_items**](#revert_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation | 撤销配置项更改 (new added) +[**sync_items**](#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) +[**syntax_check**](#syntax_check) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) [**update_item**](#update_item) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) [**update_item_by_encoded_key**](#update_item_by_encoded_key) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) -[**validate_items**](#validate_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate | 验证配置文本语法 (new added) # **batch_update_items_by_text** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} batch_update_items_by_text(app_idenvcluster_namenamespace_nameoperatoropen_namespace_text_model) +> batch_update_items_by_text(app_idenvcluster_namenamespace_nameopen_namespace_text_model) 通过文本批量修改配置项 (new added) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: ### Example @@ -65,6 +65,35 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } + query_params = { + } + body = OpenNamespaceTextModel( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + namespace_id=1, + format="format_example", + config_text="config_text_example", + operator="operator_example", + ) + try: + # 通过文本批量修改配置项 (new added) + api_response = api_instance.batch_update_items_by_text( + path_params=path_params, + query_params=query_params, + body=body, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->batch_update_items_by_text: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } query_params = { 'operator': "operator_example", } @@ -85,7 +114,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling ItemManagementApi->batch_update_items_by_text: %s\n" % e) ``` @@ -115,7 +143,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -175,16 +203,9 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### batch_update_items_by_text.ApiResponseFor403 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -206,11 +227,11 @@ Type | Description | Notes # **compare_items** -> [OpenItemDiffs] compare_items(app_idenvcluster_namenamespace_nameopen_namespace_sync_model) +> [OpenItemDiffDTO] compare_items(app_idenvcluster_namenamespace_nameopen_namespace_sync_dto) 对比命名空间配置差异 (new added) -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare +POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff ### Example @@ -218,8 +239,8 @@ POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compa ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api -from apollo_openapi.model.open_item_diffs import OpenItemDiffs -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO +from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO 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. @@ -249,7 +270,7 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } - body = OpenNamespaceSyncModel( + body = OpenNamespaceSyncDTO( sync_to_namespaces=[ OpenNamespaceIdentifier( app_id="app_id_example", @@ -260,14 +281,22 @@ with apollo_openapi.ApiClient(configuration) as api_client: ], sync_items=[ OpenItemDTO( + key="key_example", + value="value_example", + type=1, + comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), data_change_created_by="data_change_created_by_example", data_change_last_modified_by="data_change_last_modified_by_example", data_change_created_time="2025-09-29T12:34:56Z", data_change_last_modified_time="2025-09-29T12:34:56Z", - key="key_example", - type=1, - value="value_example", - comment="comment_example", ) ], ) @@ -298,7 +327,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil # SchemaForRequestBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenNamespaceSyncModel**](../../models/OpenNamespaceSyncModel.md) | | +[**OpenNamespaceSyncDTO**](../../models/OpenNamespaceSyncDTO.md) | | ### path_params @@ -363,7 +392,7 @@ list, tuple, | tuple, | | ### Tuple Items Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -[**OpenItemDiffs**]({{complexTypePrefix}}OpenItemDiffs.md) | [**OpenItemDiffs**]({{complexTypePrefix}}OpenItemDiffs.md) | [**OpenItemDiffs**]({{complexTypePrefix}}OpenItemDiffs.md) | | +[**OpenItemDiffDTO**]({{complexTypePrefix}}OpenItemDiffDTO.md) | [**OpenItemDiffDTO**]({{complexTypePrefix}}OpenItemDiffDTO.md) | [**OpenItemDiffDTO**]({{complexTypePrefix}}OpenItemDiffDTO.md) | | ### Authorization @@ -373,7 +402,7 @@ Class Name | Input Type | Accessed Type | Description | Notes # **create_item** -> OpenItemDTO create_item(app_idenvcluster_namenamespace_nameoperatoropen_item_dto) +> OpenItemDTO create_item(app_idenvcluster_namenamespace_nameopen_item_dto) 创建新的配置项 (original openapi) @@ -417,17 +446,63 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'namespaceName': "namespaceName_example", } query_params = { - 'operator': "operator_example", } body = OpenItemDTO( + key="key_example", + value="value_example", + type=1, + comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), data_change_created_by="data_change_created_by_example", data_change_last_modified_by="data_change_last_modified_by_example", data_change_created_time="2025-09-29T12:34:56Z", data_change_last_modified_time="2025-09-29T12:34:56Z", + ) + try: + # 创建新的配置项 (original openapi) + api_response = api_instance.create_item( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->create_item: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenItemDTO( key="key_example", - type=1, value="value_example", + type=1, comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", ) try: # 创建新的配置项 (original openapi) @@ -466,7 +541,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -570,7 +645,7 @@ Type | Description | Notes # **delete_item** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_item(app_idenvcluster_namenamespace_namekeyoperator) +> delete_item(app_idenvcluster_namenamespace_namekey) 删除配置项 (original openapi) @@ -612,6 +687,25 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'namespaceName': "namespaceName_example", 'key': "key_example", } + query_params = { + } + try: + # 删除配置项 (original openapi) + api_response = api_instance.delete_item( + path_params=path_params, + query_params=query_params, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->delete_item: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } query_params = { 'operator': "operator_example", } @@ -621,7 +715,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params=path_params, query_params=query_params, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling ItemManagementApi->delete_item: %s\n" % e) ``` @@ -631,7 +724,6 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -641,7 +733,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -708,16 +800,9 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -726,7 +811,7 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | # **delete_item_by_encoded_key** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_item_by_encoded_key(app_idenvcluster_namenamespace_namekeyoperator) +> delete_item_by_encoded_key(app_idenvcluster_namenamespace_namekeyoperator) 通过编码的key删除配置项 (original openapi) @@ -777,7 +862,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params=path_params, query_params=query_params, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling ItemManagementApi->delete_item_by_encoded_key: %s\n" % e) ``` @@ -787,7 +871,6 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -864,29 +947,22 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **find_items_by_namespace** - -> OpenItemPageDTO find_items_by_namespace(app_idenvcluster_namenamespace_namepagesize) +# **find_branch_items** + +> [OpenItemDTO] find_branch_items(app_idenvcluster_namenamespace_namebranch_name) -获取命名空间下的配置项列表 (original openapi) +获取分支下的配置项 (new added) -获取指定命名空间的配置项列表,支持分页 +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: ### Example @@ -894,7 +970,7 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api -from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO +from apollo_openapi.model.open_item_dto import OpenItemDTO from apollo_openapi.model.exception_response import ExceptionResponse from pprint import pprint # Defining the host is optional and defaults to http://localhost @@ -924,55 +1000,27 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'env': "env_example", 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", - } - query_params = { - 'page': 0, - 'size': 50, + 'branchName': "branchName_example", } try: - # 获取命名空间下的配置项列表 (original openapi) - api_response = api_instance.find_items_by_namespace( + # 获取分支下的配置项 (new added) + api_response = api_instance.find_branch_items( path_params=path_params, - query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->find_items_by_namespace: %s\n" % e) + print("Exception when calling ItemManagementApi->find_branch_items: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -page | PageSchema | | -size | SizeSchema | | - - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - ### path_params #### RequestPathParams @@ -982,6 +1030,7 @@ appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | # AppIdSchema @@ -1011,15 +1060,22 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_items_by_namespace.ApiResponseFor200) | 成功获取配置项列表 -404 | [ApiResponseFor404](#find_items_by_namespace.ApiResponseFor404) | 命名空间不存在 +200 | [ApiResponseFor200](#find_branch_items.ApiResponseFor200) | 成功获取分支下的配置项列表 +404 | [ApiResponseFor404](#find_branch_items.ApiResponseFor404) | 分支不存在 -#### find_items_by_namespace.ApiResponseFor200 +#### find_branch_items.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1027,12 +1083,18 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenItemPageDTO**](../../models/OpenItemPageDTO.md) | | +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | [**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | [**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | | -#### find_items_by_namespace.ApiResponseFor404 +#### find_branch_items.ApiResponseFor404 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1051,13 +1113,13 @@ Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **get_branch_items** - -> [OpenItemDTO] get_branch_items(app_idenvcluster_namenamespace_namebranch_name) +# **find_items_by_namespace** + +> OpenItemPageDTO find_items_by_namespace(app_idenvcluster_namenamespace_namepagesize) -获取分支下的配置项 (new added) +获取命名空间下的配置项列表 (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: +获取指定命名空间的配置项列表,支持分页 ### Example @@ -1065,7 +1127,7 @@ GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{names ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api -from apollo_openapi.model.open_item_dto import OpenItemDTO +from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO from apollo_openapi.model.exception_response import ExceptionResponse from pprint import pprint # Defining the host is optional and defaults to http://localhost @@ -1095,27 +1157,55 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'env': "env_example", 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", + } + query_params = { + 'page': 0, + 'size': 50, } try: - # 获取分支下的配置项 (new added) - api_response = api_instance.get_branch_items( + # 获取命名空间下的配置项列表 (original openapi) + api_response = api_instance.find_items_by_namespace( path_params=path_params, + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->get_branch_items: %s\n" % e) + print("Exception when calling ItemManagementApi->find_items_by_namespace: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +page | PageSchema | | +size | SizeSchema | | + + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | + ### path_params #### RequestPathParams @@ -1125,7 +1215,6 @@ appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | -branchName | BranchNameSchema | | # AppIdSchema @@ -1155,22 +1244,15 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# BranchNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_branch_items.ApiResponseFor200) | 成功获取分支下的配置项列表 -404 | [ApiResponseFor404](#get_branch_items.ApiResponseFor404) | 分支不存在 +200 | [ApiResponseFor200](#find_items_by_namespace.ApiResponseFor200) | 成功获取配置项列表 +404 | [ApiResponseFor404](#find_items_by_namespace.ApiResponseFor404) | 命名空间不存在 -#### get_branch_items.ApiResponseFor200 +#### find_items_by_namespace.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1178,18 +1260,12 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenItemPageDTO**](../../models/OpenItemPageDTO.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | [**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | [**OpenItemDTO**]({{complexTypePrefix}}OpenItemDTO.md) | | -#### get_branch_items.ApiResponseFor404 +#### find_items_by_namespace.ApiResponseFor404 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1512,11 +1588,11 @@ Type | Description | Notes # **revert_items** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} revert_items(app_idenvcluster_namenamespace_nameoperator) +> revert_items(app_idenvcluster_namenamespace_name) 撤销配置项更改 (new added) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation ### Example @@ -1555,7 +1631,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'namespaceName': "namespaceName_example", } query_params = { - 'operator': "operator_example", } try: # 撤销配置项更改 (new added) @@ -1563,14 +1638,32 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params=path_params, query_params=query_params, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling ItemManagementApi->revert_items: %s\n" % e) -``` -### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + try: + # 撤销配置项更改 (new added) + api_response = api_instance.revert_items( + path_params=path_params, + query_params=query_params, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->revert_items: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client @@ -1583,7 +1676,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -1644,16 +1737,9 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### revert_items.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -1688,11 +1774,11 @@ Type | Description | Notes # **sync_items** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} sync_items(app_idenvcluster_namenamespace_nameoperatoropen_namespace_sync_model) +> sync_items(app_idenvcluster_namenamespace_nameopen_namespace_sync_dto) 同步配置项到多个命名空间 (new added) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: ### Example @@ -1700,7 +1786,7 @@ POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{name ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO from apollo_openapi.model.exception_response import ExceptionResponse from pprint import pprint # Defining the host is optional and defaults to http://localhost @@ -1732,9 +1818,8 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'namespaceName': "namespaceName_example", } query_params = { - 'operator': "operator_example", } - body = OpenNamespaceSyncModel( + body = OpenNamespaceSyncDTO( sync_to_namespaces=[ OpenNamespaceIdentifier( app_id="app_id_example", @@ -1745,14 +1830,72 @@ with apollo_openapi.ApiClient(configuration) as api_client: ], sync_items=[ OpenItemDTO( + key="key_example", + value="value_example", + type=1, + comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), data_change_created_by="data_change_created_by_example", data_change_last_modified_by="data_change_last_modified_by_example", data_change_created_time="2025-09-29T12:34:56Z", data_change_last_modified_time="2025-09-29T12:34:56Z", + ) + ], + ) + try: + # 同步配置项到多个命名空间 (new added) + api_response = api_instance.sync_items( + path_params=path_params, + query_params=query_params, + body=body, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->sync_items: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'operator': "operator_example", + } + body = OpenNamespaceSyncDTO( + sync_to_namespaces=[ + OpenNamespaceIdentifier( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + ) + ], + sync_items=[ + OpenItemDTO( key="key_example", - type=1, value="value_example", + type=1, comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", ) ], ) @@ -1763,7 +1906,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling ItemManagementApi->sync_items: %s\n" % e) ``` @@ -1785,7 +1927,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil # SchemaForRequestBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenNamespaceSyncModel**](../../models/OpenNamespaceSyncModel.md) | | +[**OpenNamespaceSyncDTO**](../../models/OpenNamespaceSyncDTO.md) | | ### query_params @@ -1793,7 +1935,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -1854,16 +1996,9 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### sync_items.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -1896,13 +2031,13 @@ Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **update_item** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_item(app_idenvcluster_namenamespace_namekeyopen_item_dto) +# **syntax_check** + +> syntax_check(app_idenvcluster_namenamespace_nameopen_namespace_text_model) -更新配置项 (original openapi) +验证配置文本语法 (new added) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation ### Example @@ -1910,8 +2045,8 @@ PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{names ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api -from apollo_openapi.model.open_item_dto import OpenItemDTO from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel 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. @@ -1940,38 +2075,31 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'env': "env_example", 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", - 'key': "key_example", - } - query_params = { - 'createIfNotExists': False, } - body = OpenItemDTO( - data_change_created_by="data_change_created_by_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - key="key_example", - type=1, - value="value_example", - comment="comment_example", + body = OpenNamespaceTextModel( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + namespace_name="namespace_name_example", + namespace_id=1, + format="format_example", + config_text="config_text_example", + operator="operator_example", ) try: - # 更新配置项 (original openapi) - api_response = api_instance.update_item( + # 验证配置文本语法 (new added) + api_response = api_instance.syntax_check( path_params=path_params, - query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->update_item: %s\n" % e) + print("Exception when calling ItemManagementApi->syntax_check: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | path_params | RequestPathParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client @@ -1984,24 +2112,9 @@ skip_deserialization | bool | default is False | when True, headers and body wil # SchemaForRequestBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenItemDTO**](../../models/OpenItemDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -createIfNotExists | CreateIfNotExistsSchema | | +[**OpenNamespaceTextModel**](../../models/OpenNamespaceTextModel.md) | | -# CreateIfNotExistsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - ### path_params #### RequestPathParams @@ -2011,7 +2124,6 @@ appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | -key | KeySchema | | # AppIdSchema @@ -2041,38 +2153,22 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# KeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_item.ApiResponseFor200) | 配置项更新成功 -400 | [ApiResponseFor400](#update_item.ApiResponseFor400) | 请求参数错误 -403 | [ApiResponseFor403](#update_item.ApiResponseFor403) | 权限不足 -404 | [ApiResponseFor404](#update_item.ApiResponseFor404) | 配置项不存在 +200 | [ApiResponseFor200](#syntax_check.ApiResponseFor200) | 配置文本语法验证通过 +400 | [ApiResponseFor400](#syntax_check.ApiResponseFor400) | 配置文本语法错误 -#### update_item.ApiResponseFor200 +#### syntax_check.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -#### update_item.ApiResponseFor400 +#### syntax_check.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2085,45 +2181,19 @@ Type | Description | Notes [**ExceptionResponse**](../../models/ExceptionResponse.md) | | -#### update_item.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### update_item.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **update_item_by_encoded_key** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_item_by_encoded_key(app_idenvcluster_namenamespace_namekeyopen_item_dto) +# **update_item** + +> update_item(app_idenvcluster_namenamespace_namekeyopen_item_dto) -通过编码的key更新配置项 (original openapi) +更新配置项 (original openapi) -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} ### Example @@ -2167,25 +2237,72 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'createIfNotExists': False, } body = OpenItemDTO( + key="key_example", + value="value_example", + type=1, + comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), data_change_created_by="data_change_created_by_example", data_change_last_modified_by="data_change_last_modified_by_example", data_change_created_time="2025-09-29T12:34:56Z", data_change_last_modified_time="2025-09-29T12:34:56Z", + ) + try: + # 更新配置项 (original openapi) + api_response = api_instance.update_item( + path_params=path_params, + query_params=query_params, + body=body, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->update_item: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + query_params = { + 'createIfNotExists': False, + 'operator': "operator_example", + } + body = OpenItemDTO( key="key_example", - type=1, value="value_example", + type=1, comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", ) try: - # 通过编码的key更新配置项 (original openapi) - api_response = api_instance.update_item_by_encoded_key( + # 更新配置项 (original openapi) + api_response = api_instance.update_item( path_params=path_params, query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->update_item_by_encoded_key: %s\n" % e) + print("Exception when calling ItemManagementApi->update_item: %s\n" % e) ``` ### Parameters @@ -2214,6 +2331,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- createIfNotExists | CreateIfNotExistsSchema | | +operator | OperatorSchema | | optional # CreateIfNotExistsSchema @@ -2223,6 +2341,13 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | if omitted the server will use the default value of False +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -2274,26 +2399,19 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#update_item_by_encoded_key.ApiResponseFor200) | 配置项更新成功(编码key) -400 | [ApiResponseFor400](#update_item_by_encoded_key.ApiResponseFor400) | 请求参数错误 -403 | [ApiResponseFor403](#update_item_by_encoded_key.ApiResponseFor403) | 权限不足 -404 | [ApiResponseFor404](#update_item_by_encoded_key.ApiResponseFor404) | 配置项不存在 +200 | [ApiResponseFor200](#update_item.ApiResponseFor200) | 配置项更新成功 +400 | [ApiResponseFor400](#update_item.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#update_item.ApiResponseFor403) | 权限不足 +404 | [ApiResponseFor404](#update_item.ApiResponseFor404) | 配置项不存在 -#### update_item_by_encoded_key.ApiResponseFor200 +#### update_item.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -#### update_item_by_encoded_key.ApiResponseFor400 +#### update_item.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2306,7 +2424,7 @@ Type | Description | Notes [**ExceptionResponse**](../../models/ExceptionResponse.md) | | -#### update_item_by_encoded_key.ApiResponseFor403 +#### update_item.ApiResponseFor403 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2319,7 +2437,7 @@ Type | Description | Notes [**ExceptionResponse**](../../models/ExceptionResponse.md) | | -#### update_item_by_encoded_key.ApiResponseFor404 +#### update_item.ApiResponseFor404 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2338,13 +2456,13 @@ Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **validate_items** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} validate_items(app_idenvcluster_namenamespace_nameopen_namespace_text_model) +# **update_item_by_encoded_key** + +> update_item_by_encoded_key(app_idenvcluster_namenamespace_namekeyopen_item_dto) -验证配置文本语法 (new added) +通过编码的key更新配置项 (original openapi) -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate +PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} ### Example @@ -2352,8 +2470,8 @@ POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{name ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api +from apollo_openapi.model.open_item_dto import OpenItemDTO from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel 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. @@ -2382,32 +2500,85 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'env': "env_example", 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", + 'key': "key_example", } - body = OpenNamespaceTextModel( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - namespace_name="namespace_name_example", - namespace_id=1, - format="format_example", - config_text="config_text_example", - operator="operator_example", + query_params = { + 'createIfNotExists': False, + } + body = OpenItemDTO( + key="key_example", + value="value_example", + type=1, + comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", ) try: - # 验证配置文本语法 (new added) - api_response = api_instance.validate_items( + # 通过编码的key更新配置项 (original openapi) + api_response = api_instance.update_item_by_encoded_key( path_params=path_params, + query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->validate_items: %s\n" % e) + print("Exception when calling ItemManagementApi->update_item_by_encoded_key: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'key': "key_example", + } + query_params = { + 'createIfNotExists': False, + 'operator': "operator_example", + } + body = OpenItemDTO( + key="key_example", + value="value_example", + type=1, + comment="comment_example", + extend_info=OpenItemExtendDTO( + namespace_id=1, + is_modified=True, + is_deleted=True, + is_newly_added=True, + new_value="new_value_example", + old_value="old_value_example", + ), + data_change_created_by="data_change_created_by_example", + data_change_last_modified_by="data_change_last_modified_by_example", + data_change_created_time="2025-09-29T12:34:56Z", + data_change_last_modified_time="2025-09-29T12:34:56Z", + ) + try: + # 通过编码的key更新配置项 (original openapi) + api_response = api_instance.update_item_by_encoded_key( + path_params=path_params, + query_params=query_params, + body=body, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling ItemManagementApi->update_item_by_encoded_key: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | path_params | RequestPathParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client @@ -2420,9 +2591,32 @@ skip_deserialization | bool | default is False | when True, headers and body wil # SchemaForRequestBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenNamespaceTextModel**](../../models/OpenNamespaceTextModel.md) | | +[**OpenItemDTO**](../../models/OpenItemDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +createIfNotExists | CreateIfNotExistsSchema | | +operator | OperatorSchema | | optional +# CreateIfNotExistsSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -2432,6 +2626,7 @@ appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | +key | KeySchema | | # AppIdSchema @@ -2461,29 +2656,31 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | +# KeySchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#validate_items.ApiResponseFor200) | 配置文本语法验证通过 -400 | [ApiResponseFor400](#validate_items.ApiResponseFor400) | 配置文本语法错误 +200 | [ApiResponseFor200](#update_item_by_encoded_key.ApiResponseFor200) | 配置项更新成功(编码key) +400 | [ApiResponseFor400](#update_item_by_encoded_key.ApiResponseFor400) | 请求参数错误 +403 | [ApiResponseFor403](#update_item_by_encoded_key.ApiResponseFor403) | 权限不足 +404 | [ApiResponseFor404](#update_item_by_encoded_key.ApiResponseFor404) | 配置项不存在 -#### validate_items.ApiResponseFor200 +#### update_item_by_encoded_key.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -#### validate_items.ApiResponseFor400 +#### update_item_by_encoded_key.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -2496,6 +2693,32 @@ Type | Description | Notes [**ExceptionResponse**](../../models/ExceptionResponse.md) | | +#### update_item_by_encoded_key.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | + + +#### update_item_by_encoded_key.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | + + ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) diff --git a/python/docs/apis/tags/NamespaceBranchManagementApi.md b/python/docs/apis/tags/NamespaceBranchManagementApi.md index 8dd034a..b1d7194 100644 --- a/python/docs/apis/tags/NamespaceBranchManagementApi.md +++ b/python/docs/apis/tags/NamespaceBranchManagementApi.md @@ -9,12 +9,13 @@ Method | HTTP request | Description [**delete_branch**](#delete_branch) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 删除命名空间分支 (original openapi) [**find_branch**](#find_branch) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches | 获取命名空间分支信息 (original openapi) [**get_branch_gray_rules**](#get_branch_gray_rules) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 获取分支灰度发布规则 (original openapi) -[**merge_branch**](#merge_branch) | **patch** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) +[**merge**](#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) +[**merge_branch**](#merge_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) [**update_branch_rules**](#update_branch_rules) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) # **create_branch** -> OpenNamespaceDTO create_branch(app_idenvcluster_namenamespace_nameoperator) +> OpenNamespaceDTO create_branch(app_idenvcluster_namenamespace_name) 创建命名空间分支 (original openapi) @@ -56,6 +57,25 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } + query_params = { + } + try: + # 创建命名空间分支 (original openapi) + api_response = api_instance.create_branch( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->create_branch: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } query_params = { 'operator': "operator_example", } @@ -85,7 +105,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -161,7 +181,7 @@ Type | Description | Notes # **delete_branch** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_branch(envapp_idcluster_namenamespace_namebranch_nameoperator) +> delete_branch(envapp_idcluster_namenamespace_namebranch_nameoperator) 删除命名空间分支 (original openapi) @@ -212,7 +232,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params=path_params, query_params=query_params, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling NamespaceBranchManagementApi->delete_branch: %s\n" % e) ``` @@ -222,7 +241,6 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -299,16 +317,9 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -360,10 +371,33 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } + query_params = { + } try: # 获取命名空间分支信息 (original openapi) api_response = api_instance.find_branch( path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->find_branch: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'extendInfo': False, + } + try: + # 获取命名空间分支信息 (original openapi) + api_response = api_instance.find_branch( + path_params=path_params, + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: @@ -373,12 +407,28 @@ with apollo_openapi.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +extendInfo | ExtendInfoSchema | | optional + + +# ExtendInfoSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + ### path_params #### RequestPathParams @@ -587,6 +637,209 @@ Type | Description | Notes [**OpenGrayReleaseRuleDTO**](../../models/OpenGrayReleaseRuleDTO.md) | | +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **merge** + +> OpenReleaseDTO merge(app_idenvcluster_namenamespace_namebranch_namedelete_branchnamespace_release_dto) + +合并分支 (original openapi) + +合并灰度分支并可选择删除分支 + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_branch_management_api +from apollo_openapi.model.open_release_dto import OpenReleaseDTO +from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO +from apollo_openapi.model.exception_response import ExceptionResponse +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } + query_params = { + 'deleteBranch': True, + } + body = NamespaceReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + ) + try: + # 合并分支 (original openapi) + api_response = api_instance.merge( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->merge: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson] | required | +query_params | RequestQueryParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | + + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +deleteBranch | DeleteBranchSchema | | + + +# DeleteBranchSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +branchName | BranchNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# BranchNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#merge.ApiResponseFor200) | 分支合并成功 +400 | [ApiResponseFor400](#merge.ApiResponseFor400) | 合并参数错误 +403 | [ApiResponseFor403](#merge.ApiResponseFor403) | 权限不足 + +#### merge.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | + + +#### merge.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | + + +#### merge.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | + + ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -595,11 +848,11 @@ Type | Description | Notes # **merge_branch** -> OpenReleaseDTO merge_branch(envapp_idcluster_namenamespace_namebranch_namedelete_branchoperatornamespace_release_dto) +> OpenReleaseDTO merge_branch(envapp_idcluster_namenamespace_namebranch_namedelete_branchnamespace_release_dto) 合并分支到主分支 (new added) -PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") +POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} ### Example @@ -639,6 +892,34 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'namespaceName': "namespaceName_example", 'branchName': "branchName_example", } + query_params = { + 'deleteBranch': True, + } + body = NamespaceReleaseDTO( + release_title="release_title_example", + release_comment="release_comment_example", + released_by="released_by_example", + is_emergency_publish=True, + ) + try: + # 合并分支到主分支 (new added) + api_response = api_instance.merge_branch( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceBranchManagementApi->merge_branch: %s\n" % e) + + # example passing only optional values + path_params = { + 'env': "env_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'branchName': "branchName_example", + } query_params = { 'deleteBranch': True, 'operator': "operator_example", @@ -687,7 +968,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- deleteBranch | DeleteBranchSchema | | -operator | OperatorSchema | | +operator | OperatorSchema | | optional # DeleteBranchSchema @@ -778,7 +1059,7 @@ Type | Description | Notes # **update_branch_rules** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_branch_rules(app_idenvcluster_namenamespace_namebranch_nameoperatoropen_gray_release_rule_dto) +> update_branch_rules(app_idenvcluster_namenamespace_namebranch_nameoperatoropen_gray_release_rule_dto) 更新分支灰度发布规则 (original openapi) @@ -852,7 +1133,6 @@ with apollo_openapi.ApiClient(configuration) as api_client: query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: print("Exception when calling NamespaceBranchManagementApi->update_branch_rules: %s\n" % e) ``` @@ -864,7 +1144,6 @@ body | typing.Union[SchemaForRequestBodyApplicationJson] | required | query_params | RequestQueryParams | | path_params | RequestPathParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -949,16 +1228,9 @@ n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization i Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) diff --git a/python/docs/apis/tags/NamespaceLockManagementApi.md b/python/docs/apis/tags/NamespaceLockManagementApi.md new file mode 100644 index 0000000..733050b --- /dev/null +++ b/python/docs/apis/tags/NamespaceLockManagementApi.md @@ -0,0 +1,135 @@ + +# apollo_openapi.apis.tags.namespace_lock_management_api.NamespaceLockManagementApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_namespace_lock**](#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) + +# **get_namespace_lock** + +> OpenNamespaceLockDTO get_namespace_lock(app_idenvcluster_namenamespace_name) + +获取Namespace的锁状态 (original openapi) + +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import namespace_lock_management_api +from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO +from pprint import pprint +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = apollo_openapi.Configuration( + host = "http://localhost" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiKeyAuth +configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' +# Enter a context with an instance of the API client +with apollo_openapi.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = namespace_lock_management_api.NamespaceLockManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + try: + # 获取Namespace的锁状态 (original openapi) + api_response = api_instance.get_namespace_lock( + path_params=path_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceLockManagementApi->get_namespace_lock: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | + +# AppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#get_namespace_lock.ApiResponseFor200) | + +#### get_namespace_lock.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceLockDTO**](../../models/OpenNamespaceLockDTO.md) | | + + +### Authorization + +[ApiKeyAuth](../../../README.md#ApiKeyAuth) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/NamespaceManagementApi.md b/python/docs/apis/tags/NamespaceManagementApi.md index dadcbbb..198d806 100644 --- a/python/docs/apis/tags/NamespaceManagementApi.md +++ b/python/docs/apis/tags/NamespaceManagementApi.md @@ -5,27 +5,23 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**check_namespace_integrity**](#check_namespace_integrity) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check | 检查缺失的Namespace (new added) -[**create_namespace**](#create_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) -[**delete_app_namespace**](#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) -[**delete_namespace_links**](#delete_namespace_links) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links | 删除关联的Namespace (new added) +[**create_missing_namespaces**](#create_missing_namespaces) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) +[**create_namespaces**](#create_namespaces) | **post** /openapi/v1/namespaces | 创建Namespace (new added) +[**delete_namespace**](#delete_namespace) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) +[**find_missing_namespaces**](#find_missing_namespaces) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) +[**find_namespace**](#find_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) +[**find_namespace_usage**](#find_namespace_usage) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) [**find_namespaces**](#find_namespaces) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) -[**get_app_namespace**](#get_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) -[**get_app_namespaces**](#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) -[**get_app_namespaces_by_app**](#get_app_namespaces_by_app) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) -[**get_namespace_lock**](#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) +[**find_public_namespace_for_associated_namespace**](#find_public_namespace_for_associated_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) [**get_namespaces_release_status**](#get_namespaces_release_status) | **get** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) -[**get_public_app_namespace_instances**](#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) -[**get_public_namespace_association**](#get_public_namespace_association) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association | 获取关联的公共Namespace (new added) -[**load_namespace**](#load_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) -# **check_namespace_integrity** - -> [str] check_namespace_integrity(app_idenvcluster_name) +# **create_missing_namespaces** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_missing_namespaces(app_idenvcluster_name) -检查缺失的Namespace (new added) +创建缺失的Namespace (new added) -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check +POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces ### Example @@ -61,25 +57,63 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'env': "env_example", 'clusterName': "clusterName_example", } + query_params = { + } + try: + # 创建缺失的Namespace (new added) + api_response = api_instance.create_missing_namespaces( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->create_missing_namespaces: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + } + query_params = { + 'operator': "operator_example", + } try: - # 检查缺失的Namespace (new added) - api_response = api_instance.check_namespace_integrity( + # 创建缺失的Namespace (new added) + api_response = api_instance.create_missing_namespaces( path_params=path_params, + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->check_namespace_integrity: %s\n" % e) + print("Exception when calling NamespaceManagementApi->create_missing_namespaces: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +operator | OperatorSchema | | optional + + +# OperatorSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -115,9 +149,9 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#check_namespace_integrity.ApiResponseFor200) | 缺失的命名空间名称列表 +200 | [ApiResponseFor200](#create_missing_namespaces.ApiResponseFor200) | 缺失的命名空间创建成功 -#### check_namespace_integrity.ApiResponseFor200 +#### create_missing_namespaces.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -129,12 +163,7 @@ headers | Unset | headers were not defined | ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | +dict, frozendict.frozendict, | frozendict.frozendict, | | ### Authorization @@ -142,13 +171,13 @@ items | str, | str, | | [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **create_namespace** - -> OpenAppNamespaceDTO create_namespace(app_idopen_app_namespace_dto) +# **create_namespaces** + +> create_namespaces(open_create_namespace_dto) -创建AppNamespace (original openapi) +创建Namespace (new added) -POST /openapi/v1/apps/{appId}/appnamespaces +POST /openapi/v1/apps/{appId}/namespaces ### Example @@ -156,8 +185,7 @@ POST /openapi/v1/apps/{appId}/appnamespaces ```python import apollo_openapi from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO 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. @@ -181,39 +209,53 @@ with apollo_openapi.ApiClient(configuration) as api_client: api_instance = namespace_management_api.NamespaceManagementApi(api_client) # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", + query_params = { } - body = OpenAppNamespaceDTO( - data_change_created_by="data_change_created_by_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - format="format_example", - is_public=True, - append_namespace_prefix=True, - comment="comment_example", - ) + body = [ + OpenCreateNamespaceDTO( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + app_namespace_name="app_namespace_name_example", + ) + ] try: - # 创建AppNamespace (original openapi) - api_response = api_instance.create_namespace( - path_params=path_params, + # 创建Namespace (new added) + api_response = api_instance.create_namespaces( + query_params=query_params, + body=body, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->create_namespaces: %s\n" % e) + + # example passing only optional values + query_params = { + 'operator': "operator_example", + } + body = [ + OpenCreateNamespaceDTO( + app_id="app_id_example", + env="env_example", + cluster_name="cluster_name_example", + app_namespace_name="app_namespace_name_example", + ) + ] + try: + # 创建Namespace (new added) + api_response = api_instance.create_namespaces( + query_params=query_params, body=body, ) - pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->create_namespace: %s\n" % e) + print("Exception when calling NamespaceManagementApi->create_namespaces: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | +query_params | RequestQueryParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -221,19 +263,26 @@ skip_deserialization | bool | default is False | when True, headers and body wil ### body # SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenCreateNamespaceDTO**]({{complexTypePrefix}}OpenCreateNamespaceDTO.md) | [**OpenCreateNamespaceDTO**]({{complexTypePrefix}}OpenCreateNamespaceDTO.md) | [**OpenCreateNamespaceDTO**]({{complexTypePrefix}}OpenCreateNamespaceDTO.md) | | -### path_params -#### RequestPathParams +### query_params +#### RequestQueryParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | +operator | OperatorSchema | | optional -# AppIdSchema + +# OperatorSchema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -245,62 +294,28 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_namespace.ApiResponseFor200) | AppNamespace创建成功 -400 | [ApiResponseFor400](#create_namespace.ApiResponseFor400) | 请求参数错误 -403 | [ApiResponseFor403](#create_namespace.ApiResponseFor403) | 权限不足 - -#### create_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | - - -#### create_namespace.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - +200 | [ApiResponseFor200](#create_namespaces.ApiResponseFor200) | Namespace创建成功 -#### create_namespace.ApiResponseFor403 +#### create_namespaces.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **delete_app_namespace** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_app_namespace(app_idnamespace_nameoperator) +# **delete_namespace** + +> delete_namespace(app_idenvcluster_namenamespace_name) -删除AppNamespace (new added) +删除指定的Namespace (new added) -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} +DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} ### Example @@ -333,20 +348,39 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + } + try: + # 删除指定的Namespace (new added) + api_response = api_instance.delete_namespace( + path_params=path_params, + query_params=query_params, + ) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->delete_namespace: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } query_params = { 'operator': "operator_example", } try: - # 删除AppNamespace (new added) - api_response = api_instance.delete_app_namespace( + # 删除指定的Namespace (new added) + api_response = api_instance.delete_namespace( path_params=path_params, query_params=query_params, ) - pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->delete_app_namespace: %s\n" % e) + print("Exception when calling NamespaceManagementApi->delete_namespace: %s\n" % e) ``` ### Parameters @@ -354,7 +388,6 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -364,7 +397,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -380,6 +413,8 @@ str, | str, | | Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | # AppIdSchema @@ -389,6 +424,20 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + # NamespaceNameSchema ## Model Type Info @@ -401,35 +450,28 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_app_namespace.ApiResponseFor200) | AppNamespace删除成功 +200 | [ApiResponseFor200](#delete_namespace.ApiResponseFor200) | 解除关联成功 -#### delete_app_namespace.ApiResponseFor200 +#### delete_namespace.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | +body | Unset | body was not defined | headers | Unset | headers were not defined | -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **delete_namespace_links** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_namespace_links(app_idenvcluster_namenamespace_nameoperator) +# **find_missing_namespaces** + +> [str] find_missing_namespaces(app_idenvcluster_name) -删除关联的Namespace (new added) +查找缺失的Namespace (new added) -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces ### Example @@ -464,47 +506,26 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'appId': "appId_example", 'env': "env_example", 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", } try: - # 删除关联的Namespace (new added) - api_response = api_instance.delete_namespace_links( + # 查找缺失的Namespace (new added) + api_response = api_instance.find_missing_namespaces( path_params=path_params, - query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->delete_namespace_links: %s\n" % e) + print("Exception when calling NamespaceManagementApi->find_missing_namespaces: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - ### path_params #### RequestPathParams @@ -513,7 +534,6 @@ Name | Type | Description | Notes appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | # AppIdSchema @@ -536,21 +556,14 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_namespace_links.ApiResponseFor200) | 解除关联成功 +200 | [ApiResponseFor200](#find_missing_namespaces.ApiResponseFor200) | 缺失的命名空间名称列表 -#### delete_namespace_links.ApiResponseFor200 +#### find_missing_namespaces.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -562,7 +575,12 @@ headers | Unset | headers were not defined | ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +items | str, | str, | | ### Authorization @@ -570,13 +588,13 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **find_namespaces** - -> [OpenNamespaceDTO] find_namespaces(app_idenvcluster_name) +# **find_namespace** + +> OpenNamespaceDTO find_namespace(app_idenvcluster_namenamespace_name) -获取指定集群下的所有Namespace (original openapi) +获取指定的Namespace (original openapi) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} ### Example @@ -612,19 +630,41 @@ with apollo_openapi.ApiClient(configuration) as api_client: 'appId': "appId_example", 'env': "env_example", 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", } query_params = { 'fillItemDetail': True, } try: - # 获取指定集群下的所有Namespace (original openapi) - api_response = api_instance.find_namespaces( + # 获取指定的Namespace (original openapi) + api_response = api_instance.find_namespace( path_params=path_params, query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_namespaces: %s\n" % e) + print("Exception when calling NamespaceManagementApi->find_namespace: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { + 'fillItemDetail': True, + 'extendInfo': False, + } + try: + # 获取指定的Namespace (original openapi) + api_response = api_instance.find_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->find_namespace: %s\n" % e) ``` ### Parameters @@ -643,6 +683,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- fillItemDetail | FillItemDetailSchema | | +extendInfo | ExtendInfoSchema | | optional # FillItemDetailSchema @@ -652,6 +693,13 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | if omitted the server will use the default value of True +# ExtendInfoSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +bool, | BoolClass, | | if omitted the server will use the default value of False + ### path_params #### RequestPathParams @@ -660,6 +708,7 @@ Name | Type | Description | Notes appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | # AppIdSchema @@ -682,14 +731,21 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | +# NamespaceNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_namespaces.ApiResponseFor200) | +200 | [ApiResponseFor200](#find_namespace.ApiResponseFor200) | -#### find_namespaces.ApiResponseFor200 +#### find_namespace.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -697,16 +753,10 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenNamespaceDTO**](../../models/OpenNamespaceDTO.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | ### Authorization @@ -714,13 +764,13 @@ Class Name | Input Type | Accessed Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **get_app_namespace** - -> OpenAppNamespaceDTO get_app_namespace(app_idnamespace_name) +# **find_namespace_usage** + +> [OpenNamespaceUsageDTO] find_namespace_usage(app_idenvcluster_namenamespace_name) -获取指定的AppNamespace (new added) +查询namespace使用情况(new added) -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} +GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage ### Example @@ -728,7 +778,7 @@ GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} ```python import apollo_openapi from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO 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. @@ -754,16 +804,18 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } try: - # 获取指定的AppNamespace (new added) - api_response = api_instance.get_app_namespace( + # 查询namespace使用情况(new added) + api_response = api_instance.find_namespace_usage( path_params=path_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_app_namespace: %s\n" % e) + print("Exception when calling NamespaceManagementApi->find_namespace_usage: %s\n" % e) ``` ### Parameters @@ -781,6 +833,8 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- appId | AppIdSchema | | +env | EnvSchema | | +clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | # AppIdSchema @@ -790,6 +844,20 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | +# EnvSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# ClusterNameSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + # NamespaceNameSchema ## Model Type Info @@ -802,110 +870,9 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_app_namespace.ApiResponseFor200) | 成功获取AppNamespace +200 | [ApiResponseFor200](#find_namespace_usage.ApiResponseFor200) | NamespaceUsage查询成功 -#### get_app_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_app_namespaces** - -> [OpenAppNamespaceDTO] get_app_namespaces(public_only) - -获取所有公共AppNamespace (new added) - -GET /openapi/v1/appnamespaces?public=true - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = namespace_management_api.NamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'publicOnly': False, - } - try: - # 获取所有公共AppNamespace (new added) - api_response = api_instance.get_app_namespaces( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_app_namespaces: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -publicOnly | PublicOnlySchema | | - - -# PublicOnlySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_app_namespaces.ApiResponseFor200) | - -#### get_app_namespaces.ApiResponseFor200 +#### find_namespace_usage.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -922,7 +889,7 @@ list, tuple, | tuple, | | ### Tuple Items Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | +[**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | | ### Authorization @@ -930,13 +897,13 @@ Class Name | Input Type | Accessed Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **get_app_namespaces_by_app** - -> [OpenAppNamespaceDTO] get_app_namespaces_by_app(app_id) +# **find_namespaces** + +> [OpenNamespaceDTO] find_namespaces(app_idenvcluster_name) -获取指定应用的AppNamespace (new added) +获取指定集群下的所有Namespace (original openapi) -GET /openapi/v1/apps/{appId}/appnamespaces +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces ### Example @@ -944,7 +911,7 @@ GET /openapi/v1/apps/{appId}/appnamespaces ```python import apollo_openapi from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO 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. @@ -970,134 +937,75 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + } + query_params = { + 'fillItemDetail': True, } try: - # 获取指定应用的AppNamespace (new added) - api_response = api_instance.get_app_namespaces_by_app( + # 获取指定集群下的所有Namespace (original openapi) + api_response = api_instance.find_namespaces( path_params=path_params, + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_app_namespaces_by_app: %s\n" % e) + print("Exception when calling NamespaceManagementApi->find_namespaces: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + 'env': "env_example", + 'clusterName': "clusterName_example", + } + query_params = { + 'fillItemDetail': True, + 'extendInfo': False, + } + try: + # 获取指定集群下的所有Namespace (original openapi) + api_response = api_instance.find_namespaces( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling NamespaceManagementApi->find_namespaces: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### path_params -#### RequestPathParams +### query_params +#### RequestQueryParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | +fillItemDetail | FillItemDetailSchema | | +extendInfo | ExtendInfoSchema | | optional -# AppIdSchema + +# FillItemDetailSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_app_namespaces_by_app.ApiResponseFor200) | - -#### get_app_namespaces_by_app.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | +bool, | BoolClass, | | if omitted the server will use the default value of True -# SchemaFor200ResponseBodyApplicationJson +# ExtendInfoSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_namespace_lock** - -> OpenNamespaceLockDTO get_namespace_lock(app_idenvcluster_namenamespace_name) - -获取Namespace的锁状态 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = namespace_management_api.NamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - try: - # 获取Namespace的锁状态 (original openapi) - api_response = api_instance.get_namespace_lock( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_namespace_lock: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned +bool, | BoolClass, | | if omitted the server will use the default value of False ### path_params #### RequestPathParams @@ -1107,7 +1015,6 @@ Name | Type | Description | Notes appId | AppIdSchema | | env | EnvSchema | | clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | # AppIdSchema @@ -1130,21 +1037,14 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_namespace_lock.ApiResponseFor200) | +200 | [ApiResponseFor200](#find_namespaces.ApiResponseFor200) | -#### get_namespace_lock.ApiResponseFor200 +#### find_namespaces.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1152,10 +1052,16 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenNamespaceLockDTO**](../../models/OpenNamespaceLockDTO.md) | | +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | ### Authorization @@ -1163,13 +1069,13 @@ Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **get_namespaces_release_status** - -> StringToStringBoolMap get_namespaces_release_status(app_id) +# **find_public_namespace_for_associated_namespace** + +> OpenNamespaceDTO find_public_namespace_for_associated_namespace(envapp_idcluster_namenamespace_name) -获取应用下所有Namespace的发布状态 (new added) +查询关联Namespace对应的公共Namespace详情 (new added) -GET /openapi/v1/apps/{appId}/namespaces/releases/status +GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace ### Example @@ -1177,7 +1083,7 @@ GET /openapi/v1/apps/{appId}/namespaces/releases/status ```python import apollo_openapi from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.string_to_string_bool_map import StringToStringBoolMap +from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO 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. @@ -1202,122 +1108,42 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { + 'env': "env_example", 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + } + query_params = { } try: - # 获取应用下所有Namespace的发布状态 (new added) - api_response = api_instance.get_namespaces_release_status( + # 查询关联Namespace对应的公共Namespace详情 (new added) + api_response = api_instance.find_public_namespace_for_associated_namespace( path_params=path_params, + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_namespaces_release_status: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_namespaces_release_status.ApiResponseFor200) | 成功获取发布状态映射 - -#### get_namespaces_release_status.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StringToStringBoolMap**](../../models/StringToStringBoolMap.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_public_app_namespace_instances** - -> [OpenNamespaceDTO] get_public_app_namespace_instances(envpublic_namespace_namepagesize) - -获取公共AppNamespace的所有实例 (new added) - -GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' + print("Exception when calling NamespaceManagementApi->find_public_namespace_for_associated_namespace: %s\n" % e) -# 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 = namespace_management_api.NamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set + # example passing only optional values path_params = { 'env': "env_example", - 'publicNamespaceName': "publicNamespaceName_example", + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", } query_params = { - 'page': 0, - 'size': 10, + 'extendInfo': False, } try: - # 获取公共AppNamespace的所有实例 (new added) - api_response = api_instance.get_public_app_namespace_instances( + # 查询关联Namespace对应的公共Namespace详情 (new added) + api_response = api_instance.find_public_namespace_for_associated_namespace( path_params=path_params, query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_public_app_namespace_instances: %s\n" % e) + print("Exception when calling NamespaceManagementApi->find_public_namespace_for_associated_namespace: %s\n" % e) ``` ### Parameters @@ -1335,23 +1161,15 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -page | PageSchema | | -size | SizeSchema | | - +extendInfo | ExtendInfoSchema | | optional -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | -# SizeSchema +# ExtendInfoSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | +bool, | BoolClass, | | if omitted the server will use the default value of False ### path_params #### RequestPathParams @@ -1359,135 +1177,18 @@ decimal.Decimal, int, | decimal.Decimal, | | Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- env | EnvSchema | | -publicNamespaceName | PublicNamespaceNameSchema | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PublicNamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_public_app_namespace_instances.ApiResponseFor200) | 成功获取实例列表 - -#### get_public_app_namespace_instances.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_public_namespace_association** - -> OpenNamespaceDTO get_public_namespace_association(app_idenvcluster_namenamespace_name) - -获取关联的公共Namespace (new added) - -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.apis.tags import namespace_management_api -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = namespace_management_api.NamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - try: - # 获取关联的公共Namespace (new added) - api_response = api_instance.get_public_namespace_association( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->get_public_namespace_association: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- appId | AppIdSchema | | -env | EnvSchema | | clusterName | ClusterNameSchema | | namespaceName | NamespaceNameSchema | | -# AppIdSchema +# EnvSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# EnvSchema +# AppIdSchema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -1513,9 +1214,9 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_public_namespace_association.ApiResponseFor200) | 成功获取关联的公共Namespace +200 | [ApiResponseFor200](#find_public_namespace_for_associated_namespace.ApiResponseFor200) | 成功获取关联的公共Namespace详情 -#### get_public_namespace_association.ApiResponseFor200 +#### find_public_namespace_for_associated_namespace.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1534,13 +1235,13 @@ Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **load_namespace** - -> OpenNamespaceDTO load_namespace(app_idenvcluster_namenamespace_name) +# **get_namespaces_release_status** + +> StringToStringBoolMap get_namespaces_release_status(app_id) -获取指定的Namespace (original openapi) +获取应用下所有Namespace的发布状态 (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} +GET /openapi/v1/apps/{appId}/namespaces/releases/status ### Example @@ -1548,7 +1249,7 @@ GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{names ```python import apollo_openapi from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO +from apollo_openapi.model.string_to_string_bool_map import StringToStringBoolMap 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. @@ -1574,58 +1275,32 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'fillItemDetail': True, } try: - # 获取指定的Namespace (original openapi) - api_response = api_instance.load_namespace( + # 获取应用下所有Namespace的发布状态 (new added) + api_response = api_instance.get_namespaces_release_status( path_params=path_params, - query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->load_namespace: %s\n" % e) + print("Exception when calling NamespaceManagementApi->get_namespaces_release_status: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -fillItemDetail | FillItemDetailSchema | | - - -# FillItemDetailSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of True - ### path_params #### RequestPathParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | # AppIdSchema @@ -1634,35 +1309,14 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ClusterNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#load_namespace.ApiResponseFor200) | +200 | [ApiResponseFor200](#get_namespaces_release_status.ApiResponseFor200) | 成功获取发布状态映射 -#### load_namespace.ApiResponseFor200 +#### get_namespaces_release_status.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1672,7 +1326,7 @@ headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenNamespaceDTO**](../../models/OpenNamespaceDTO.md) | | +[**StringToStringBoolMap**](../../models/StringToStringBoolMap.md) | | ### Authorization diff --git a/python/docs/apis/tags/ReleaseManagementApi.md b/python/docs/apis/tags/ReleaseManagementApi.md index ca6c3af..c78c423 100644 --- a/python/docs/apis/tags/ReleaseManagementApi.md +++ b/python/docs/apis/tags/ReleaseManagementApi.md @@ -12,7 +12,6 @@ Method | HTTP request | Description [**find_all_releases**](#find_all_releases) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all | 获取所有发布(分页) (new added) [**get_release_by_id**](#get_release_by_id) | **get** /openapi/v1/envs/{env}/releases/{releaseId} | 获取发布详情 (new added) [**load_latest_active_release**](#load_latest_active_release) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest | 获取最新活跃发布 (original openapi) -[**merge**](#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) [**rollback**](#rollback) | **put** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) # **create_gray_del_release** @@ -1073,13 +1072,13 @@ Type | Description | Notes [[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) -# **merge** - -> OpenReleaseDTO merge(app_idenvcluster_namenamespace_namebranch_namedelete_branchnamespace_release_dto) +# **rollback** + +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} rollback(envrelease_id) -合并分支 (original openapi) +回滚发布 (original openapi) -合并灰度分支并可选择删除分支 +回滚到指定的发布版本 ### Example @@ -1087,9 +1086,6 @@ Type | Description | Notes ```python import apollo_openapi from apollo_openapi.apis.tags import release_management_api -from apollo_openapi.model.open_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.model.exception_response import ExceptionResponse 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. @@ -1114,205 +1110,22 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { - 'appId': "appId_example", 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", + 'releaseId': 1, } query_params = { - 'deleteBranch': True, } - body = NamespaceReleaseDTO( - release_title="release_title_example", - release_comment="release_comment_example", - released_by="released_by_example", - is_emergency_publish=True, - ) try: - # 合并分支 (original openapi) - api_response = api_instance.merge( + # 回滚发布 (original openapi) + api_response = api_instance.rollback( path_params=path_params, query_params=query_params, - body=body, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling ReleaseManagementApi->merge: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -deleteBranch | DeleteBranchSchema | | - - -# DeleteBranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | -branchName | BranchNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ClusterNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#merge.ApiResponseFor200) | 分支合并成功 -400 | [ApiResponseFor400](#merge.ApiResponseFor400) | 合并参数错误 -403 | [ApiResponseFor403](#merge.ApiResponseFor403) | 权限不足 - -#### merge.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | - - -#### merge.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### merge.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **rollback** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} rollback(envrelease_idoperator) - -回滚发布 (original openapi) - -回滚到指定的发布版本 - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import release_management_api -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = release_management_api.ReleaseManagementApi(api_client) + print("Exception when calling ReleaseManagementApi->rollback: %s\n" % e) - # example passing only required values which don't have defaults set + # example passing only optional values path_params = { 'env': "env_example", 'releaseId': 1, @@ -1346,7 +1159,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema diff --git a/python/docs/models/MultiResponseEntity.md b/python/docs/models/MultiResponseEntity.md deleted file mode 100644 index 180cd13..0000000 --- a/python/docs/models/MultiResponseEntity.md +++ /dev/null @@ -1,31 +0,0 @@ -# apollo_openapi.model.multi_response_entity.MultiResponseEntity - -A response container holding multiple RichResponseEntity objects - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A response container holding multiple RichResponseEntity objects | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | decimal.Decimal, int, | decimal.Decimal, | Overall HTTP status code | -**[entities](#entities)** | list, tuple, | tuple, | List of rich response entities | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# entities - -List of rich response entities - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | List of rich response entities | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**RichResponseEntity**](RichResponseEntity.md) | [**RichResponseEntity**](RichResponseEntity.md) | [**RichResponseEntity**](RichResponseEntity.md) | | - -[[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/models/OpenCreateItemDTO.md b/python/docs/models/OpenCreateItemDTO.md new file mode 100644 index 0000000..aa76afe --- /dev/null +++ b/python/docs/models/OpenCreateItemDTO.md @@ -0,0 +1,17 @@ +# apollo_openapi.model.open_create_item_dto.OpenCreateItemDTO + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**key** | str, | str, | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] +**type** | decimal.Decimal, int, | decimal.Decimal, | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] +**value** | str, | str, | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] +**comment** | str, | str, | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenCreateNamespaceDTO.md b/python/docs/models/OpenCreateNamespaceDTO.md new file mode 100644 index 0000000..eed523b --- /dev/null +++ b/python/docs/models/OpenCreateNamespaceDTO.md @@ -0,0 +1,19 @@ +# apollo_openapi.model.open_create_namespace_dto.OpenCreateNamespaceDTO + +Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**appId** | str, | str, | 所属应用的唯一标识符 | [optional] +**env** | str, | str, | 所在那个环境创建 | [optional] +**clusterName** | str, | str, | 所属集群的名称 | [optional] +**appNamespaceName** | str, | str, | 根据已创建的appnamespace来实例化namespace | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemDTO.md b/python/docs/models/OpenItemDTO.md index 0291e54..a0ff9b0 100644 --- a/python/docs/models/OpenItemDTO.md +++ b/python/docs/models/OpenItemDTO.md @@ -1,23 +1,24 @@ # apollo_openapi.model.open_item_dto.OpenItemDTO -Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 +Apollo配置项核心数据对象,仅包含键值及基础审计信息 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 | +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo配置项核心数据对象,仅包含键值及基础审计信息 | ### Dictionary Keys Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- +**key** | str, | str, | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] +**value** | str, | str, | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] +**type** | decimal.Decimal, int, | decimal.Decimal, | 配置项类型 | [optional] +**comment** | str, | str, | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] +**extendInfo** | [**OpenItemExtendDTO**](OpenItemExtendDTO.md) | [**OpenItemExtendDTO**](OpenItemExtendDTO.md) | | [optional] **dataChangeCreatedBy** | str, | str, | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] **dataChangeLastModifiedBy** | str, | str, | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] **dataChangeCreatedTime** | str, | str, | 配置项创建时间,ISO 8601格式的时间戳 | [optional] **dataChangeLastModifiedTime** | str, | str, | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] -**key** | str, | str, | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] -**type** | decimal.Decimal, int, | decimal.Decimal, | 配置项类型,0表示普通配置项,1表示文件类型配置项 | [optional] -**value** | str, | str, | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] -**comment** | str, | str, | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemDiffDTO.md b/python/docs/models/OpenItemDiffDTO.md new file mode 100644 index 0000000..51dc50e --- /dev/null +++ b/python/docs/models/OpenItemDiffDTO.md @@ -0,0 +1,55 @@ +# apollo_openapi.model.open_item_diff_dto.OpenItemDiffDTO + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**code** | decimal.Decimal, int, | decimal.Decimal, | 查找结果 | [optional] +**message** | str, | str, | 查找结果信息 | [optional] +**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] +**[createItems](#createItems)** | list, tuple, | tuple, | | [optional] +**[deleteItems](#deleteItems)** | list, tuple, | tuple, | | [optional] +**[updateItems](#updateItems)** | list, tuple, | tuple, | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# createItems + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +# deleteItems + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +# updateItems + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | + +[[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/models/OpenItemExtendDTO.md b/python/docs/models/OpenItemExtendDTO.md new file mode 100644 index 0000000..48e1948 --- /dev/null +++ b/python/docs/models/OpenItemExtendDTO.md @@ -0,0 +1,21 @@ +# apollo_openapi.model.open_item_extend_dto.OpenItemExtendDTO + +Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**namespaceId** | decimal.Decimal, int, | decimal.Decimal, | 所属命名空间的ID | [optional] value must be a 64 bit integer +**isModified** | bool, | BoolClass, | 是否有未发布的修改 | [optional] +**isDeleted** | bool, | BoolClass, | 是否被标记为删除(未发布) | [optional] +**isNewlyAdded** | bool, | BoolClass, | 是否为新添加的配置项(未发布) | [optional] +**newValue** | str, | str, | 新的值 | [optional] +**oldValue** | str, | str, | 上一次发布的值,用于对比变更 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceDTO.md b/python/docs/models/OpenNamespaceDTO.md index 7011ad9..36f1827 100644 --- a/python/docs/models/OpenNamespaceDTO.md +++ b/python/docs/models/OpenNamespaceDTO.md @@ -21,6 +21,7 @@ Key | Input Type | Accessed Type | Description | Notes **format** | str, | str, | 命名空间格式类型,如properties、xml、json、yml等 | [optional] **isPublic** | bool, | BoolClass, | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] **[items](#items)** | list, tuple, | tuple, | 命名空间包含的配置项列表 | [optional] +**extendInfo** | [**OpenNamespaceExtendDTO**](OpenNamespaceExtendDTO.md) | [**OpenNamespaceExtendDTO**](OpenNamespaceExtendDTO.md) | | [optional] **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] # items diff --git a/python/docs/models/OpenItemDiffs.md b/python/docs/models/OpenNamespaceExtendDTO.md similarity index 66% rename from python/docs/models/OpenItemDiffs.md rename to python/docs/models/OpenNamespaceExtendDTO.md index de73fe0..4af0431 100644 --- a/python/docs/models/OpenItemDiffs.md +++ b/python/docs/models/OpenNamespaceExtendDTO.md @@ -1,4 +1,4 @@ -# apollo_openapi.model.open_item_diffs.OpenItemDiffs +# apollo_openapi.model.open_namespace_extend_dto.OpenNamespaceExtendDTO ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -8,9 +8,9 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | ### Dictionary Keys Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- -**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] -**diffs** | [**OpenItemChangeSets**](OpenItemChangeSets.md) | [**OpenItemChangeSets**](OpenItemChangeSets.md) | | [optional] -**extInfo** | str, | str, | 扩展信息 | [optional] +**isConfigHidden** | bool, | BoolClass, | 当当前用户无权限查看配置时置为 true | [optional] +**parentAppId** | str, | str, | 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 | [optional] +**itemModifiedCnt** | decimal.Decimal, int, | decimal.Decimal, | 未发布变更数 | [optional] **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceLockDTO.md b/python/docs/models/OpenNamespaceLockDTO.md index 85c5310..147ec56 100644 --- a/python/docs/models/OpenNamespaceLockDTO.md +++ b/python/docs/models/OpenNamespaceLockDTO.md @@ -13,6 +13,7 @@ Key | Input Type | Accessed Type | Description | Notes **namespaceName** | str, | str, | 命名空间名称 | [optional] **isLocked** | bool, | BoolClass, | 是否被锁定 | [optional] **lockedBy** | str, | str, | 锁定者用户名 | [optional] +**isEmergencyPublishAllowed** | bool, | BoolClass, | 是否允许紧急发布 | [optional] **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceSyncModel.md b/python/docs/models/OpenNamespaceSyncDTO.md similarity index 88% rename from python/docs/models/OpenNamespaceSyncModel.md rename to python/docs/models/OpenNamespaceSyncDTO.md index 24d1c5d..a72273f 100644 --- a/python/docs/models/OpenNamespaceSyncModel.md +++ b/python/docs/models/OpenNamespaceSyncDTO.md @@ -1,4 +1,4 @@ -# apollo_openapi.model.open_namespace_sync_model.OpenNamespaceSyncModel +# apollo_openapi.model.open_namespace_sync_dto.OpenNamespaceSyncDTO ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -9,7 +9,7 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- **[syncToNamespaces](#syncToNamespaces)** | list, tuple, | tuple, | 目标命名空间标识列表 | [optional] -**[syncItems](#syncItems)** | list, tuple, | tuple, | 需要同步的配置项列表 | [optional] +**[syncItems](#syncItems)** | list, tuple, | tuple, | 需要修改的配置项列表 | [optional] **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] # syncToNamespaces @@ -28,12 +28,12 @@ Class Name | Input Type | Accessed Type | Description | Notes # syncItems -需要同步的配置项列表 +需要修改的配置项列表 ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -list, tuple, | tuple, | 需要同步的配置项列表 | +list, tuple, | tuple, | 需要修改的配置项列表 | ### Tuple Items Class Name | Input Type | Accessed Type | Description | Notes diff --git a/python/docs/models/OpenNamespaceUsageDTO.md b/python/docs/models/OpenNamespaceUsageDTO.md new file mode 100644 index 0000000..b090a72 --- /dev/null +++ b/python/docs/models/OpenNamespaceUsageDTO.md @@ -0,0 +1,22 @@ +# apollo_openapi.model.open_namespace_usage_dto.OpenNamespaceUsageDTO + +命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**namespaceName** | str, | str, | 命名空间名称 | [optional] +**appId** | str, | str, | 所属应用的唯一标识符 | [optional] +**clusterName** | str, | str, | 所属集群名称 | [optional] +**envName** | str, | str, | 环境名称 | [optional] +**instanceCount** | decimal.Decimal, int, | decimal.Decimal, | 该命名空间关联的实例数量 | [optional] +**branchInstanceCount** | decimal.Decimal, int, | decimal.Decimal, | 分支命名空间关联的实例数量 | [optional] +**linkedNamespaceCount** | decimal.Decimal, int, | decimal.Decimal, | 关联到该公共命名空间的命名空间数量 | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/RichResponseEntity.md b/python/docs/models/RichResponseEntity.md deleted file mode 100644 index 0e5fac6..0000000 --- a/python/docs/models/RichResponseEntity.md +++ /dev/null @@ -1,36 +0,0 @@ -# apollo_openapi.model.rich_response_entity.RichResponseEntity - -A wrapper for a single response entity with code, message, and body - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | A wrapper for a single response entity with code, message, and body | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | decimal.Decimal, int, | decimal.Decimal, | HTTP status code | -**[message](#message)** | dict, frozendict.frozendict, | frozendict.frozendict, | Response message (can be string or object) | -**[body](#body)** | dict, frozendict.frozendict, | frozendict.frozendict, | Response payload (generic type T) | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# message - -Response message (can be string or object) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Response message (can be string or object) | - -# body - -Response payload (generic type T) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Response payload (generic type T) | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/test/test_models/test_rich_response_entity.py b/python/test/test_models/test_open_create_item_dto.py similarity index 86% rename from python/test/test_models/test_rich_response_entity.py rename to python/test/test_models/test_open_create_item_dto.py index a62aa2b..b999a99 100644 --- a/python/test/test_models/test_rich_response_entity.py +++ b/python/test/test_models/test_open_create_item_dto.py @@ -12,12 +12,12 @@ import unittest import apollo_openapi -from apollo_openapi.model.rich_response_entity import RichResponseEntity +from apollo_openapi.model.open_create_item_dto import OpenCreateItemDTO from apollo_openapi import configuration -class TestRichResponseEntity(unittest.TestCase): - """RichResponseEntity unit test stubs""" +class TestOpenCreateItemDTO(unittest.TestCase): + """OpenCreateItemDTO unit test stubs""" _configuration = configuration.Configuration() diff --git a/python/test/test_models/test_open_namespace_sync_model.py b/python/test/test_models/test_open_create_namespace_dto.py similarity index 85% rename from python/test/test_models/test_open_namespace_sync_model.py rename to python/test/test_models/test_open_create_namespace_dto.py index d32584d..c6118ea 100644 --- a/python/test/test_models/test_open_namespace_sync_model.py +++ b/python/test/test_models/test_open_create_namespace_dto.py @@ -12,12 +12,12 @@ import unittest import apollo_openapi -from apollo_openapi.model.open_namespace_sync_model import OpenNamespaceSyncModel +from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO from apollo_openapi import configuration -class TestOpenNamespaceSyncModel(unittest.TestCase): - """OpenNamespaceSyncModel unit test stubs""" +class TestOpenCreateNamespaceDTO(unittest.TestCase): + """OpenCreateNamespaceDTO unit test stubs""" _configuration = configuration.Configuration() diff --git a/python/test/test_models/test_open_item_diffs.py b/python/test/test_models/test_open_item_diff_dto.py similarity index 87% rename from python/test/test_models/test_open_item_diffs.py rename to python/test/test_models/test_open_item_diff_dto.py index bb1959b..2b641ed 100644 --- a/python/test/test_models/test_open_item_diffs.py +++ b/python/test/test_models/test_open_item_diff_dto.py @@ -12,12 +12,12 @@ import unittest import apollo_openapi -from apollo_openapi.model.open_item_diffs import OpenItemDiffs +from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO from apollo_openapi import configuration -class TestOpenItemDiffs(unittest.TestCase): - """OpenItemDiffs unit test stubs""" +class TestOpenItemDiffDTO(unittest.TestCase): + """OpenItemDiffDTO unit test stubs""" _configuration = configuration.Configuration() diff --git a/python/test/test_models/test_multi_response_entity.py b/python/test/test_models/test_open_item_extend_dto.py similarity index 86% rename from python/test/test_models/test_multi_response_entity.py rename to python/test/test_models/test_open_item_extend_dto.py index 74f69f1..431cf7f 100644 --- a/python/test/test_models/test_multi_response_entity.py +++ b/python/test/test_models/test_open_item_extend_dto.py @@ -12,12 +12,12 @@ import unittest import apollo_openapi -from apollo_openapi.model.multi_response_entity import MultiResponseEntity +from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO from apollo_openapi import configuration -class TestMultiResponseEntity(unittest.TestCase): - """MultiResponseEntity unit test stubs""" +class TestOpenItemExtendDTO(unittest.TestCase): + """OpenItemExtendDTO unit test stubs""" _configuration = configuration.Configuration() diff --git a/python/test/test_models/test_open_namespace_extend_dto.py b/python/test/test_models/test_open_namespace_extend_dto.py new file mode 100644 index 0000000..29e9b06 --- /dev/null +++ b/python/test/test_models/test_open_namespace_extend_dto.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO +from apollo_openapi import configuration + + +class TestOpenNamespaceExtendDTO(unittest.TestCase): + """OpenNamespaceExtendDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_sync_dto.py b/python/test/test_models/test_open_namespace_sync_dto.py new file mode 100644 index 0000000..8876f2d --- /dev/null +++ b/python/test/test_models/test_open_namespace_sync_dto.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO +from apollo_openapi import configuration + + +class TestOpenNamespaceSyncDTO(unittest.TestCase): + """OpenNamespaceSyncDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_models/test_open_namespace_usage_dto.py b/python/test/test_models/test_open_namespace_usage_dto.py new file mode 100644 index 0000000..f1d40c4 --- /dev/null +++ b/python/test/test_models/test_open_namespace_usage_dto.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + Apollo OpenAPI + +

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\"
# noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import apollo_openapi +from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO +from apollo_openapi import configuration + + +class TestOpenNamespaceUsageDTO(unittest.TestCase): + """OpenNamespaceUsageDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py index ed2c8c8..ac8ad5d 100644 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' if __name__ == '__main__': diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/__init__.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/test_get.py new file mode 100644 index 0000000..69f0dac --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage unit test stubs + 查询appnamespace使用情况(new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/__init__.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_get.py similarity index 67% rename from python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_get.py index d733523..6b18e2f 100644 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check/test_get.py +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_get.py @@ -12,16 +12,16 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_integrity_check import get # noqa: E501 +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import get # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces(ApiTestMixin, unittest.TestCase): """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesIntegrityCheck unit test stubs - 检查缺失的Namespace (new added) # noqa: E501 + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces unit test stubs + 查找缺失的Namespace (new added) # noqa: E501 """ _configuration = configuration.Configuration() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_post.py new file mode 100644 index 0000000..151bf90 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_post.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces unit test stubs + 创建缺失的Namespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/__init__.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py similarity index 78% rename from python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py index def4cdb..7c0c6ce 100644 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/test_delete.py +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py @@ -12,16 +12,16 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links import delete # noqa: E501 +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name import delete # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName(ApiTestMixin, unittest.TestCase): """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameLinks unit test stubs - 删除关联的Namespace (new added) # noqa: E501 + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName unit test stubs + 删除指定的Namespace (new added) # noqa: E501 """ _configuration = configuration.Configuration() @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' if __name__ == '__main__': diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/__init__.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/test_get.py similarity index 75% rename from python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/test_get.py index 1358a2f..b41e2ce 100644 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association/test_get.py +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/test_get.py @@ -12,16 +12,16 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_public_association import get # noqa: E501 +from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage import get # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage(ApiTestMixin, unittest.TestCase): """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNamePublicAssociation unit test stubs - 获取关联的公共Namespace (new added) # noqa: E501 + OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage unit test stubs + 查询namespace使用情况(new added) # noqa: E501 """ _configuration = configuration.Configuration() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/__init__.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/test_get.py new file mode 100644 index 0000000..ead7112 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/test_get.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace unit test stubs + 查询关联Namespace对应的公共Namespace详情 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py index a4257cd..cdb37cb 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_delete.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' if __name__ == '__main__': diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_post.py similarity index 90% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_post.py index 51bb877..84cd97e 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_patch.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_post.py @@ -12,7 +12,7 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import patch # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import post # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin @@ -27,7 +27,7 @@ class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBra def setUp(self): used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = patch.ApiForpatch(api_client=used_api_client) # noqa: E501 + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 def tearDown(self): pass diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py index 6ba56e3..c5ab0f7 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/test_put.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py index b3e9c57..b94b137 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_delete.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' if __name__ == '__main__': diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py index 394237a..41db1ec 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/test_put.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_put.py similarity index 82% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_put.py index c167070..315e5e5 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update/test_put.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_put.py @@ -12,15 +12,15 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_batch_update import put # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items import put # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems(ApiTestMixin, unittest.TestCase): """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsBatchUpdate unit test stubs + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems unit test stubs 通过文本批量修改配置项 (new added) # noqa: E501 """ _configuration = configuration.Configuration() @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/__init__.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/test_post.py similarity index 83% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/test_post.py index 9a8afe5..f4c9d15 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare/test_post.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/test_post.py @@ -12,15 +12,15 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_compare import post # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff import post # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff(ApiTestMixin, unittest.TestCase): """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsCompare unit test stubs + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff unit test stubs 对比命名空间配置差异 (new added) # noqa: E501 """ _configuration = configuration.Configuration() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py index 51c9a65..61a90bd 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' if __name__ == '__main__': diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py index 227c369..22a3f03 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/__init__.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/test_post.py similarity index 80% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/test_post.py index 28f9aad..d379218 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert/test_post.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/test_post.py @@ -12,15 +12,15 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revert import post # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation import post # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation(ApiTestMixin, unittest.TestCase): """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevert unit test stubs + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation unit test stubs 撤销配置项更改 (new added) # noqa: E501 """ _configuration = configuration.Configuration() @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' if __name__ == '__main__': diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/__init__.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/test_post.py similarity index 80% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/test_post.py index 8b65517..c3aa8b5 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync/test_post.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/test_post.py @@ -12,15 +12,15 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_sync import post # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize import post # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize(ApiTestMixin, unittest.TestCase): """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSync unit test stubs + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize unit test stubs 同步配置项到多个命名空间 (new added) # noqa: E501 """ _configuration = configuration.Configuration() @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/test_post.py similarity index 80% rename from python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py rename to python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/test_post.py index cc1ba74..2779ae6 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate/test_post.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/test_post.py @@ -12,15 +12,15 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validate import post # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation import post # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation(ApiTestMixin, unittest.TestCase): """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidate unit test stubs + OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation unit test stubs 验证配置文本语法 (new added) # noqa: E501 """ _configuration = configuration.Configuration() @@ -33,8 +33,7 @@ def tearDown(self): pass response_status = 200 - - + response_body = '' diff --git a/python/test/test_paths/test_openapi_v1_namespaces/__init__.py b/python/test/test_paths/test_openapi_v1_namespaces/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_namespaces/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_namespaces/test_post.py b/python/test/test_paths/test_openapi_v1_namespaces/test_post.py new file mode 100644 index 0000000..0172b9d --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_namespaces/test_post.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import apollo_openapi +from apollo_openapi.paths.openapi_v1_namespaces import post # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1Namespaces(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1Namespaces unit test stubs + 创建Namespace (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + response_body = '' + + + + +if __name__ == '__main__': + unittest.main() diff --git a/rust/.openapi-generator/FILES b/rust/.openapi-generator/FILES index eba863a..ff9f9d6 100644 --- a/rust/.openapi-generator/FILES +++ b/rust/.openapi-generator/FILES @@ -5,13 +5,14 @@ Cargo.toml README.md docs/ExceptionResponse.md docs/KvEntity.md -docs/MultiResponseEntity.md docs/NamespaceGrayDelReleaseDto.md docs/NamespaceReleaseDto.md docs/OpenAppDto.md docs/OpenAppNamespaceDto.md docs/OpenClusterDto.md docs/OpenCreateAppDto.md +docs/OpenCreateItemDto.md +docs/OpenCreateNamespaceDto.md docs/OpenEnvClusterDto.md docs/OpenEnvClusterInfo.md docs/OpenGrayReleaseRuleDto.md @@ -20,19 +21,21 @@ docs/OpenInstanceConfigDto.md docs/OpenInstanceDto.md docs/OpenInstancePageDto.md docs/OpenItemChangeSets.md -docs/OpenItemDiffs.md +docs/OpenItemDiffDto.md docs/OpenItemDto.md +docs/OpenItemExtendDto.md docs/OpenItemPageDto.md docs/OpenMissEnvDto.md docs/OpenNamespaceDto.md +docs/OpenNamespaceExtendDto.md docs/OpenNamespaceIdentifier.md docs/OpenNamespaceLockDto.md -docs/OpenNamespaceSyncModel.md +docs/OpenNamespaceSyncDto.md docs/OpenNamespaceTextModel.md +docs/OpenNamespaceUsageDto.md docs/OpenOrganizationDto.md docs/OpenReleaseBo.md docs/OpenReleaseDto.md -docs/RichResponseEntity.md git_push.sh src/apis/configuration.rs src/apis/mod.rs @@ -40,13 +43,14 @@ src/lib.rs src/models/exception_response.rs src/models/kv_entity.rs src/models/mod.rs -src/models/multi_response_entity.rs src/models/namespace_gray_del_release_dto.rs src/models/namespace_release_dto.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_create_item_dto.rs +src/models/open_create_namespace_dto.rs src/models/open_env_cluster_dto.rs src/models/open_env_cluster_info.rs src/models/open_gray_release_rule_dto.rs @@ -55,16 +59,18 @@ src/models/open_instance_config_dto.rs src/models/open_instance_dto.rs src/models/open_instance_page_dto.rs src/models/open_item_change_sets.rs -src/models/open_item_diffs.rs +src/models/open_item_diff_dto.rs src/models/open_item_dto.rs +src/models/open_item_extend_dto.rs src/models/open_item_page_dto.rs src/models/open_miss_env_dto.rs src/models/open_namespace_dto.rs +src/models/open_namespace_extend_dto.rs src/models/open_namespace_identifier.rs src/models/open_namespace_lock_dto.rs -src/models/open_namespace_sync_model.rs +src/models/open_namespace_sync_dto.rs src/models/open_namespace_text_model.rs +src/models/open_namespace_usage_dto.rs src/models/open_organization_dto.rs src/models/open_release_bo.rs src/models/open_release_dto.rs -src/models/rich_response_entity.rs diff --git a/rust/README.md b/rust/README.md index 79ddd90..0739314 100644 --- a/rust/README.md +++ b/rust/README.md @@ -46,13 +46,14 @@ Class | Method | HTTP request | Description - [ExceptionResponse](docs/ExceptionResponse.md) - [KvEntity](docs/KvEntity.md) - - [MultiResponseEntity](docs/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDto](docs/NamespaceGrayDelReleaseDto.md) - [NamespaceReleaseDto](docs/NamespaceReleaseDto.md) - [OpenAppDto](docs/OpenAppDto.md) - [OpenAppNamespaceDto](docs/OpenAppNamespaceDto.md) - [OpenClusterDto](docs/OpenClusterDto.md) - [OpenCreateAppDto](docs/OpenCreateAppDto.md) + - [OpenCreateItemDto](docs/OpenCreateItemDto.md) + - [OpenCreateNamespaceDto](docs/OpenCreateNamespaceDto.md) - [OpenEnvClusterDto](docs/OpenEnvClusterDto.md) - [OpenEnvClusterInfo](docs/OpenEnvClusterInfo.md) - [OpenGrayReleaseRuleDto](docs/OpenGrayReleaseRuleDto.md) @@ -61,19 +62,21 @@ Class | Method | HTTP request | Description - [OpenInstanceDto](docs/OpenInstanceDto.md) - [OpenInstancePageDto](docs/OpenInstancePageDto.md) - [OpenItemChangeSets](docs/OpenItemChangeSets.md) - - [OpenItemDiffs](docs/OpenItemDiffs.md) + - [OpenItemDiffDto](docs/OpenItemDiffDto.md) - [OpenItemDto](docs/OpenItemDto.md) + - [OpenItemExtendDto](docs/OpenItemExtendDto.md) - [OpenItemPageDto](docs/OpenItemPageDto.md) - [OpenMissEnvDto](docs/OpenMissEnvDto.md) - [OpenNamespaceDto](docs/OpenNamespaceDto.md) + - [OpenNamespaceExtendDto](docs/OpenNamespaceExtendDto.md) - [OpenNamespaceIdentifier](docs/OpenNamespaceIdentifier.md) - [OpenNamespaceLockDto](docs/OpenNamespaceLockDto.md) - - [OpenNamespaceSyncModel](docs/OpenNamespaceSyncModel.md) + - [OpenNamespaceSyncDto](docs/OpenNamespaceSyncDto.md) - [OpenNamespaceTextModel](docs/OpenNamespaceTextModel.md) + - [OpenNamespaceUsageDto](docs/OpenNamespaceUsageDto.md) - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - [OpenReleaseBo](docs/OpenReleaseBo.md) - [OpenReleaseDto](docs/OpenReleaseDto.md) - - [RichResponseEntity](docs/RichResponseEntity.md) To get access to the crate's generated documentation, use: diff --git a/rust/docs/MultiResponseEntity.md b/rust/docs/MultiResponseEntity.md deleted file mode 100644 index cefeab5..0000000 --- a/rust/docs/MultiResponseEntity.md +++ /dev/null @@ -1,10 +0,0 @@ -# MultiResponseEntity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **i32** | Overall HTTP status code | -**entities** | [**Vec**](RichResponseEntity.md) | List of rich response entities | - -[[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/OpenCreateItemDto.md b/rust/docs/OpenCreateItemDto.md new file mode 100644 index 0000000..1808792 --- /dev/null +++ b/rust/docs/OpenCreateItemDto.md @@ -0,0 +1,12 @@ +# OpenCreateItemDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/OpenCreateNamespaceDto.md b/rust/docs/OpenCreateNamespaceDto.md new file mode 100644 index 0000000..0d7469f --- /dev/null +++ b/rust/docs/OpenCreateNamespaceDto.md @@ -0,0 +1,12 @@ +# OpenCreateNamespaceDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] +**env** | Option<**String**> | 所在那个环境创建 | [optional] +**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] +**app_namespace_name** | Option<**String**> | 根据已创建的appnamespace来实例化namespace | [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/OpenItemDiffDto.md b/rust/docs/OpenItemDiffDto.md new file mode 100644 index 0000000..d6b6459 --- /dev/null +++ b/rust/docs/OpenItemDiffDto.md @@ -0,0 +1,14 @@ +# OpenItemDiffDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**i32**> | 查找结果 | [optional] +**message** | Option<**String**> | 查找结果信息 | [optional] +**namespace** | Option<[**crate::models::OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md)> | | [optional] +**create_items** | Option<[**Vec**](OpenItemDTO.md)> | | [optional] +**delete_items** | Option<[**Vec**](OpenItemDTO.md)> | | [optional] +**update_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/OpenItemDiffs.md b/rust/docs/OpenItemDiffs.md deleted file mode 100644 index dcd3958..0000000 --- a/rust/docs/OpenItemDiffs.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenItemDiffs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace** | Option<[**crate::models::OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md)> | | [optional] -**diffs** | Option<[**crate::models::OpenItemChangeSets**](OpenItemChangeSets.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/OpenItemDto.md b/rust/docs/OpenItemDto.md index a866dd0..66f667f 100644 --- a/rust/docs/OpenItemDto.md +++ b/rust/docs/OpenItemDto.md @@ -4,13 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**key** | Option<**String**> | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] +**value** | Option<**String**> | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] +**r#type** | Option<**i32**> | 配置项类型 | [optional] +**comment** | Option<**String**> | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] +**extend_info** | Option<[**crate::models::OpenItemExtendDto**](OpenItemExtendDTO.md)> | | [optional] **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/OpenItemExtendDto.md b/rust/docs/OpenItemExtendDto.md new file mode 100644 index 0000000..92d25e3 --- /dev/null +++ b/rust/docs/OpenItemExtendDto.md @@ -0,0 +1,14 @@ +# OpenItemExtendDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace_id** | Option<**i64**> | 所属命名空间的ID | [optional] +**is_modified** | Option<**bool**> | 是否有未发布的修改 | [optional] +**is_deleted** | Option<**bool**> | 是否被标记为删除(未发布) | [optional] +**is_newly_added** | Option<**bool**> | 是否为新添加的配置项(未发布) | [optional] +**new_value** | Option<**String**> | 新的值 | [optional] +**old_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/OpenNamespaceDto.md b/rust/docs/OpenNamespaceDto.md index b4a4d70..56fa76a 100644 --- a/rust/docs/OpenNamespaceDto.md +++ b/rust/docs/OpenNamespaceDto.md @@ -15,5 +15,6 @@ Name | Type | Description | Notes **format** | Option<**String**> | 命名空间格式类型,如properties、xml、json、yml等 | [optional] **is_public** | Option<**bool**> | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] **items** | Option<[**Vec**](OpenItemDTO.md)> | 命名空间包含的配置项列表 | [optional] +**extend_info** | Option<[**crate::models::OpenNamespaceExtendDto**](OpenNamespaceExtendDTO.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/OpenNamespaceExtendDto.md b/rust/docs/OpenNamespaceExtendDto.md new file mode 100644 index 0000000..436af32 --- /dev/null +++ b/rust/docs/OpenNamespaceExtendDto.md @@ -0,0 +1,11 @@ +# OpenNamespaceExtendDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_config_hidden** | Option<**bool**> | 当当前用户无权限查看配置时置为 true | [optional] +**parent_app_id** | Option<**String**> | 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 | [optional] +**item_modified_cnt** | 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/OpenNamespaceLockDto.md b/rust/docs/OpenNamespaceLockDto.md index 94154a1..22a2573 100644 --- a/rust/docs/OpenNamespaceLockDto.md +++ b/rust/docs/OpenNamespaceLockDto.md @@ -7,5 +7,6 @@ Name | Type | Description | Notes **namespace_name** | Option<**String**> | 命名空间名称 | [optional] **is_locked** | Option<**bool**> | 是否被锁定 | [optional] **locked_by** | Option<**String**> | 锁定者用户名 | [optional] +**is_emergency_publish_allowed** | 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/OpenNamespaceSyncModel.md b/rust/docs/OpenNamespaceSyncDto.md similarity index 85% rename from rust/docs/OpenNamespaceSyncModel.md rename to rust/docs/OpenNamespaceSyncDto.md index 8270c63..03c9662 100644 --- a/rust/docs/OpenNamespaceSyncModel.md +++ b/rust/docs/OpenNamespaceSyncDto.md @@ -1,10 +1,10 @@ -# OpenNamespaceSyncModel +# OpenNamespaceSyncDto ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sync_to_namespaces** | Option<[**Vec**](OpenNamespaceIdentifier.md)> | 目标命名空间标识列表 | [optional] -**sync_items** | Option<[**Vec**](OpenItemDTO.md)> | 需要同步的配置项列表 | [optional] +**sync_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/OpenNamespaceUsageDto.md b/rust/docs/OpenNamespaceUsageDto.md new file mode 100644 index 0000000..1bd9115 --- /dev/null +++ b/rust/docs/OpenNamespaceUsageDto.md @@ -0,0 +1,15 @@ +# OpenNamespaceUsageDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**namespace_name** | Option<**String**> | 命名空间名称 | [optional] +**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] +**cluster_name** | Option<**String**> | 所属集群名称 | [optional] +**env_name** | Option<**String**> | 环境名称 | [optional] +**instance_count** | Option<**i32**> | 该命名空间关联的实例数量 | [optional] +**branch_instance_count** | Option<**i32**> | 分支命名空间关联的实例数量 | [optional] +**linked_namespace_count** | 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/RichResponseEntity.md b/rust/docs/RichResponseEntity.md deleted file mode 100644 index 27e2833..0000000 --- a/rust/docs/RichResponseEntity.md +++ /dev/null @@ -1,11 +0,0 @@ -# RichResponseEntity - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **i32** | HTTP status code | -**message** | [**serde_json::Value**](.md) | Response message (can be string or object) | -**body** | Option<[**serde_json::Value**](.md)> | Response payload (generic type T) | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs index eebdfd4..f3a5ce9 100644 --- a/rust/src/models/mod.rs +++ b/rust/src/models/mod.rs @@ -2,8 +2,6 @@ pub mod exception_response; pub use self::exception_response::ExceptionResponse; pub mod kv_entity; pub use self::kv_entity::KvEntity; -pub mod multi_response_entity; -pub use self::multi_response_entity::MultiResponseEntity; pub mod namespace_gray_del_release_dto; pub use self::namespace_gray_del_release_dto::NamespaceGrayDelReleaseDto; pub mod namespace_release_dto; @@ -16,6 +14,10 @@ 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_create_item_dto; +pub use self::open_create_item_dto::OpenCreateItemDto; +pub mod open_create_namespace_dto; +pub use self::open_create_namespace_dto::OpenCreateNamespaceDto; pub mod open_env_cluster_dto; pub use self::open_env_cluster_dto::OpenEnvClusterDto; pub mod open_env_cluster_info; @@ -32,29 +34,33 @@ pub mod open_instance_page_dto; pub use self::open_instance_page_dto::OpenInstancePageDto; pub mod open_item_change_sets; pub use self::open_item_change_sets::OpenItemChangeSets; -pub mod open_item_diffs; -pub use self::open_item_diffs::OpenItemDiffs; +pub mod open_item_diff_dto; +pub use self::open_item_diff_dto::OpenItemDiffDto; pub mod open_item_dto; pub use self::open_item_dto::OpenItemDto; +pub mod open_item_extend_dto; +pub use self::open_item_extend_dto::OpenItemExtendDto; pub mod open_item_page_dto; pub use self::open_item_page_dto::OpenItemPageDto; pub mod open_miss_env_dto; pub use self::open_miss_env_dto::OpenMissEnvDto; pub mod open_namespace_dto; pub use self::open_namespace_dto::OpenNamespaceDto; +pub mod open_namespace_extend_dto; +pub use self::open_namespace_extend_dto::OpenNamespaceExtendDto; pub mod open_namespace_identifier; pub use self::open_namespace_identifier::OpenNamespaceIdentifier; pub mod open_namespace_lock_dto; pub use self::open_namespace_lock_dto::OpenNamespaceLockDto; -pub mod open_namespace_sync_model; -pub use self::open_namespace_sync_model::OpenNamespaceSyncModel; +pub mod open_namespace_sync_dto; +pub use self::open_namespace_sync_dto::OpenNamespaceSyncDto; pub mod open_namespace_text_model; pub use self::open_namespace_text_model::OpenNamespaceTextModel; +pub mod open_namespace_usage_dto; +pub use self::open_namespace_usage_dto::OpenNamespaceUsageDto; pub mod open_organization_dto; pub use self::open_organization_dto::OpenOrganizationDto; pub mod open_release_bo; pub use self::open_release_bo::OpenReleaseBo; pub mod open_release_dto; pub use self::open_release_dto::OpenReleaseDto; -pub mod rich_response_entity; -pub use self::rich_response_entity::RichResponseEntity; diff --git a/rust/src/models/multi_response_entity.rs b/rust/src/models/multi_response_entity.rs deleted file mode 100644 index 433e113..0000000 --- a/rust/src/models/multi_response_entity.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Apollo OpenAPI - * - *

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\"
- * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// MultiResponseEntity : A response container holding multiple RichResponseEntity objects - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct MultiResponseEntity { - /// Overall HTTP status code - #[serde(rename = "code")] - pub code: i32, - /// List of rich response entities - #[serde(rename = "entities")] - pub entities: Vec, -} - -impl MultiResponseEntity { - /// A response container holding multiple RichResponseEntity objects - pub fn new(code: i32, entities: Vec) -> MultiResponseEntity { - MultiResponseEntity { - code, - entities, - } - } -} diff --git a/rust/src/models/open_create_item_dto.rs b/rust/src/models/open_create_item_dto.rs new file mode 100644 index 0000000..8381277 --- /dev/null +++ b/rust/src/models/open_create_item_dto.rs @@ -0,0 +1,39 @@ +/* + * Apollo OpenAPI + * + *

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\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OpenCreateItemDto { + /// 配置项的键名,在同一命名空间内唯一标识一个配置项 + #[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 OpenCreateItemDto { + pub fn new() -> OpenCreateItemDto { + OpenCreateItemDto { + key: None, + r#type: None, + value: None, + comment: None, + } + } +} diff --git a/rust/src/models/open_create_namespace_dto.rs b/rust/src/models/open_create_namespace_dto.rs new file mode 100644 index 0000000..ed1c00b --- /dev/null +++ b/rust/src/models/open_create_namespace_dto.rs @@ -0,0 +1,41 @@ +/* + * Apollo OpenAPI + * + *

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\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// OpenCreateNamespaceDto : Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OpenCreateNamespaceDto { + /// 所属应用的唯一标识符 + #[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, + /// 根据已创建的appnamespace来实例化namespace + #[serde(rename = "appNamespaceName", skip_serializing_if = "Option::is_none")] + pub app_namespace_name: Option, +} + +impl OpenCreateNamespaceDto { + /// Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + pub fn new() -> OpenCreateNamespaceDto { + OpenCreateNamespaceDto { + app_id: None, + env: None, + cluster_name: None, + app_namespace_name: None, + } + } +} diff --git a/rust/src/models/open_item_diffs.rs b/rust/src/models/open_item_diff_dto.rs similarity index 54% rename from rust/src/models/open_item_diffs.rs rename to rust/src/models/open_item_diff_dto.rs index cef8e8d..55a5191 100644 --- a/rust/src/models/open_item_diffs.rs +++ b/rust/src/models/open_item_diff_dto.rs @@ -12,22 +12,32 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenItemDiffs { +pub struct OpenItemDiffDto { + /// 查找结果 + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + /// 查找结果信息 + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, #[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, + #[serde(rename = "createItems", skip_serializing_if = "Option::is_none")] + pub create_items: Option>, + #[serde(rename = "deleteItems", skip_serializing_if = "Option::is_none")] + pub delete_items: Option>, + #[serde(rename = "updateItems", skip_serializing_if = "Option::is_none")] + pub update_items: Option>, } -impl OpenItemDiffs { - pub fn new() -> OpenItemDiffs { - OpenItemDiffs { +impl OpenItemDiffDto { + pub fn new() -> OpenItemDiffDto { + OpenItemDiffDto { + code: None, + message: None, namespace: None, - diffs: None, - ext_info: None, + create_items: None, + delete_items: None, + update_items: None, } } } diff --git a/rust/src/models/open_item_dto.rs b/rust/src/models/open_item_dto.rs index 180eae6..074b27f 100644 --- a/rust/src/models/open_item_dto.rs +++ b/rust/src/models/open_item_dto.rs @@ -8,12 +8,26 @@ * Generated by: https://openapi-generator.tech */ -/// OpenItemDto : Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 +/// OpenItemDto : Apollo配置项核心数据对象,仅包含键值及基础审计信息 #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenItemDto { + /// 配置项的键名,在同一命名空间内唯一标识一个配置项 + #[serde(rename = "key", skip_serializing_if = "Option::is_none")] + pub key: Option, + /// 配置项的值,可以是字符串、数字、JSON等格式 + #[serde(rename = "value", skip_serializing_if = "Option::is_none")] + pub value: Option, + /// 配置项类型 + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + /// 配置项的注释说明,用于描述配置项的用途和含义 + #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] + pub comment: Option, + #[serde(rename = "extendInfo", skip_serializing_if = "Option::is_none")] + pub extend_info: Option>, /// 配置项创建者用户名,记录是谁创建了这个配置项 #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] pub data_change_created_by: Option, @@ -26,32 +40,21 @@ pub struct OpenItemDto { /// 配置项最后修改时间,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配置项数据传输对象,表示一个具体的配置键值对及其元数据 + /// Apollo配置项核心数据对象,仅包含键值及基础审计信息 pub fn new() -> OpenItemDto { OpenItemDto { + key: None, + value: None, + r#type: None, + comment: None, + extend_info: None, 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_item_extend_dto.rs b/rust/src/models/open_item_extend_dto.rs new file mode 100644 index 0000000..845c0ec --- /dev/null +++ b/rust/src/models/open_item_extend_dto.rs @@ -0,0 +1,49 @@ +/* + * Apollo OpenAPI + * + *

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\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// OpenItemExtendDto : Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OpenItemExtendDto { + /// 所属命名空间的ID + #[serde(rename = "namespaceId", skip_serializing_if = "Option::is_none")] + pub namespace_id: Option, + /// 是否有未发布的修改 + #[serde(rename = "isModified", skip_serializing_if = "Option::is_none")] + pub is_modified: Option, + /// 是否被标记为删除(未发布) + #[serde(rename = "isDeleted", skip_serializing_if = "Option::is_none")] + pub is_deleted: Option, + /// 是否为新添加的配置项(未发布) + #[serde(rename = "isNewlyAdded", skip_serializing_if = "Option::is_none")] + pub is_newly_added: Option, + /// 新的值 + #[serde(rename = "newValue", skip_serializing_if = "Option::is_none")] + pub new_value: Option, + /// 上一次发布的值,用于对比变更 + #[serde(rename = "oldValue", skip_serializing_if = "Option::is_none")] + pub old_value: Option, +} + +impl OpenItemExtendDto { + /// Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + pub fn new() -> OpenItemExtendDto { + OpenItemExtendDto { + namespace_id: None, + is_modified: None, + is_deleted: None, + is_newly_added: None, + new_value: None, + old_value: None, + } + } +} diff --git a/rust/src/models/open_namespace_dto.rs b/rust/src/models/open_namespace_dto.rs index 6b9bd6c..f7eac55 100644 --- a/rust/src/models/open_namespace_dto.rs +++ b/rust/src/models/open_namespace_dto.rs @@ -47,6 +47,8 @@ pub struct OpenNamespaceDto { /// 命名空间包含的配置项列表 #[serde(rename = "items", skip_serializing_if = "Option::is_none")] pub items: Option>, + #[serde(rename = "extendInfo", skip_serializing_if = "Option::is_none")] + pub extend_info: Option>, } impl OpenNamespaceDto { @@ -64,6 +66,7 @@ impl OpenNamespaceDto { format: None, is_public: None, items: None, + extend_info: None, } } } diff --git a/rust/src/models/rich_response_entity.rs b/rust/src/models/open_namespace_extend_dto.rs similarity index 53% rename from rust/src/models/rich_response_entity.rs rename to rust/src/models/open_namespace_extend_dto.rs index a5c2b66..abe4721 100644 --- a/rust/src/models/rich_response_entity.rs +++ b/rust/src/models/open_namespace_extend_dto.rs @@ -8,30 +8,28 @@ * Generated by: https://openapi-generator.tech */ -/// RichResponseEntity : A wrapper for a single response entity with code, message, and body #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct RichResponseEntity { - /// HTTP status code - #[serde(rename = "code")] - pub code: i32, - /// Response message (can be string or object) - #[serde(rename = "message")] - pub message: serde_json::Value, - /// Response payload (generic type T) - #[serde(rename = "body", skip_serializing_if = "Option::is_none")] - pub body: Option, +pub struct OpenNamespaceExtendDto { + /// 当当前用户无权限查看配置时置为 true + #[serde(rename = "isConfigHidden", skip_serializing_if = "Option::is_none")] + pub is_config_hidden: Option, + /// 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + #[serde(rename = "parentAppId", skip_serializing_if = "Option::is_none")] + pub parent_app_id: Option, + /// 未发布变更数 + #[serde(rename = "itemModifiedCnt", skip_serializing_if = "Option::is_none")] + pub item_modified_cnt: Option, } -impl RichResponseEntity { - /// A wrapper for a single response entity with code, message, and body - pub fn new(code: i32, message: serde_json::Value) -> RichResponseEntity { - RichResponseEntity { - code, - message, - body: None, +impl OpenNamespaceExtendDto { + pub fn new() -> OpenNamespaceExtendDto { + OpenNamespaceExtendDto { + is_config_hidden: None, + parent_app_id: None, + item_modified_cnt: None, } } } diff --git a/rust/src/models/open_namespace_lock_dto.rs b/rust/src/models/open_namespace_lock_dto.rs index 92eca8d..4c7933d 100644 --- a/rust/src/models/open_namespace_lock_dto.rs +++ b/rust/src/models/open_namespace_lock_dto.rs @@ -23,6 +23,9 @@ pub struct OpenNamespaceLockDto { /// 锁定者用户名 #[serde(rename = "lockedBy", skip_serializing_if = "Option::is_none")] pub locked_by: Option, + /// 是否允许紧急发布 + #[serde(rename = "isEmergencyPublishAllowed", skip_serializing_if = "Option::is_none")] + pub is_emergency_publish_allowed: Option, } impl OpenNamespaceLockDto { @@ -32,6 +35,7 @@ impl OpenNamespaceLockDto { namespace_name: None, is_locked: None, locked_by: None, + is_emergency_publish_allowed: None, } } } diff --git a/rust/src/models/open_namespace_sync_model.rs b/rust/src/models/open_namespace_sync_dto.rs similarity index 87% rename from rust/src/models/open_namespace_sync_model.rs rename to rust/src/models/open_namespace_sync_dto.rs index f822b6a..c246d6c 100644 --- a/rust/src/models/open_namespace_sync_model.rs +++ b/rust/src/models/open_namespace_sync_dto.rs @@ -12,18 +12,18 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceSyncModel { +pub struct OpenNamespaceSyncDto { /// 目标命名空间标识列表 #[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 OpenNamespaceSyncModel { - pub fn new() -> OpenNamespaceSyncModel { - OpenNamespaceSyncModel { +impl OpenNamespaceSyncDto { + pub fn new() -> OpenNamespaceSyncDto { + OpenNamespaceSyncDto { sync_to_namespaces: None, sync_items: None, } diff --git a/rust/src/models/open_namespace_usage_dto.rs b/rust/src/models/open_namespace_usage_dto.rs new file mode 100644 index 0000000..a97a415 --- /dev/null +++ b/rust/src/models/open_namespace_usage_dto.rs @@ -0,0 +1,53 @@ +/* + * Apollo OpenAPI + * + *

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\"
+ * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// OpenNamespaceUsageDto : 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OpenNamespaceUsageDto { + /// 命名空间名称 + #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] + pub namespace_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 = "envName", skip_serializing_if = "Option::is_none")] + pub env_name: Option, + /// 该命名空间关联的实例数量 + #[serde(rename = "instanceCount", skip_serializing_if = "Option::is_none")] + pub instance_count: Option, + /// 分支命名空间关联的实例数量 + #[serde(rename = "branchInstanceCount", skip_serializing_if = "Option::is_none")] + pub branch_instance_count: Option, + /// 关联到该公共命名空间的命名空间数量 + #[serde(rename = "linkedNamespaceCount", skip_serializing_if = "Option::is_none")] + pub linked_namespace_count: Option, +} + +impl OpenNamespaceUsageDto { + /// 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + pub fn new() -> OpenNamespaceUsageDto { + OpenNamespaceUsageDto { + namespace_name: None, + app_id: None, + cluster_name: None, + env_name: None, + instance_count: None, + branch_instance_count: None, + linked_namespace_count: None, + } + } +} diff --git a/spring-boot2/.openapi-generator/FILES b/spring-boot2/.openapi-generator/FILES index 5c1c428..d556a25 100644 --- a/spring-boot2/.openapi-generator/FILES +++ b/spring-boot2/.openapi-generator/FILES @@ -7,6 +7,9 @@ src/main/java/com/apollo/openapi/server/api/ApiUtil.java src/main/java/com/apollo/openapi/server/api/AppManagementApi.java src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java +src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java +src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java +src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java @@ -22,6 +25,9 @@ src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java +src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java +src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java +src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java @@ -35,13 +41,14 @@ 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/ExceptionResponse.java src/main/java/com/apollo/openapi/server/model/KVEntity.java -src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.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/OpenCreateItemDTO.java +src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.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 @@ -51,18 +58,20 @@ src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.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/OpenItemDiffDTO.java +src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.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/OpenNamespaceSyncDTO.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java +src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.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/RichResponseEntity.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/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java index c1a39a7..c8fe3e8 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 @@ -394,7 +394,7 @@ default ResponseEntity> getEnvClusterInfo( /** * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 (original openapi) - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * * @param appId 应用ID (required) * @return 成功获取应用环境集群信息 (status code 200) @@ -403,7 +403,7 @@ default ResponseEntity> getEnvClusterInfo( @Operation( operationId = "getEnvClusters", summary = "获取应用的环境集群信息 (original openapi)", - description = "GET /openapi/v1/apps/{appId}/envClusters", + description = "GET /openapi/v1/apps/{appId}/envclusters", tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取应用环境集群信息", content = { 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 58e88f6..8695a14 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 @@ -228,7 +228,7 @@ default ResponseEntity> getEnvClusterInfo(String appId) /** * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 (original openapi) - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * * @param appId 应用ID (required) * @return 成功获取应用环境集群信息 (status code 200) diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java new file mode 100644 index 0000000..d26ad66 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java @@ -0,0 +1,298 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package com.apollo.openapi.server.api; + +import com.apollo.openapi.server.model.ExceptionResponse; +import com.apollo.openapi.server.model.OpenAppNamespaceDTO; +import com.apollo.openapi.server.model.OpenNamespaceDTO; +import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "AppNamespace Management", description = "AppNamespace管理相关接口,包括创建、查询、删除等操作") +public interface AppNamespaceManagementApi { + + default AppNamespaceManagementApiDelegate getDelegate() { + return new AppNamespaceManagementApiDelegate() {}; + } + + /** + * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return AppNamespace创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + */ + @Operation( + operationId = "createAppNamespace", + summary = "创建AppNamespace (original openapi)", + description = "POST /openapi/v1/apps/{appId}/appnamespaces", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "AppNamespace创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) + }), + @ApiResponse(responseCode = "400", description = "请求参数错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/openapi/v1/apps/{appId}/appnamespaces", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity createAppNamespace( + @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, + @Parameter(name = "OpenAppNamespaceDTO", description = "", required = true) @Valid @RequestBody OpenAppNamespaceDTO openAppNamespaceDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator + ) { + return getDelegate().createAppNamespace(appId, openAppNamespaceDTO, operator); + } + + + /** + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (optional) + * @return AppNamespace删除成功 (status code 200) + */ + @Operation( + operationId = "deleteAppNamespace", + summary = "删除AppNamespace (new added)", + description = "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "AppNamespace删除成功") + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" + ) + default ResponseEntity deleteAppNamespace( + @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, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator + ) { + return getDelegate().deleteAppNamespace(appId, namespaceName, operator); + } + + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) + * @return 成功获取AppNamespace (status code 200) + */ + @Operation( + operationId = "findAppNamespace", + summary = "获取指定的AppNamespace (new added)", + description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "成功获取AppNamespace", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + produces = { "application/json" } + ) + default ResponseEntity findAppNamespace( + @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, + @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo + ) { + return getDelegate().findAppNamespace(appId, namespaceName, extendInfo); + } + + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage : 查询appnamespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return AppNamespaceUsage查询成功 (status code 200) + */ + @Operation( + operationId = "findAppNamespaceUsage", + summary = "查询appnamespace使用情况(new added)", + description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "AppNamespaceUsage查询成功", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceUsageDTO.class))) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage", + produces = { "application/json" } + ) + default ResponseEntity> findAppNamespaceUsage( + @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().findAppNamespaceUsage(appId, namespaceName); + } + + + /** + * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces/public + * + * @return (status code 200) + */ + @Operation( + operationId = "getAppNamespaces", + summary = "获取所有公共AppNamespace (new added)", + description = "GET /openapi/v1/appnamespaces/public", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/appnamespaces", + produces = { "application/json" } + ) + default ResponseEntity> getAppNamespaces( + + ) { + return getDelegate().getAppNamespaces(); + } + + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces + * + * @param appId (required) + * @return (status code 200) + */ + @Operation( + operationId = "getAppNamespacesByAppId", + summary = "获取指定应用的AppNamespace (new added)", + description = "GET /openapi/v1/apps/{appId}/appnamespaces", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/apps/{appId}/appnamespaces", + produces = { "application/json" } + ) + default ResponseEntity> getAppNamespacesByAppId( + @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + ) { + return getDelegate().getAppNamespacesByAppId(appId); + } + + + /** + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取实例列表 (status code 200) + */ + @Operation( + operationId = "getPublicAppNamespaceInstances", + summary = "获取公共AppNamespace的所有实例 (new added)", + description = "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", + tags = { "AppNamespace Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "成功获取实例列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", + produces = { "application/json" } + ) + default ResponseEntity> getPublicAppNamespaceInstances( + @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().getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); + } + +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java new file mode 100644 index 0000000..2668187 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java @@ -0,0 +1,47 @@ +package com.apollo.openapi.server.api; + +import com.apollo.openapi.server.model.ExceptionResponse; +import com.apollo.openapi.server.model.OpenAppNamespaceDTO; +import com.apollo.openapi.server.model.OpenNamespaceDTO; +import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.apolloOpen.base-path:}") +public class AppNamespaceManagementApiController implements AppNamespaceManagementApi { + + private final AppNamespaceManagementApiDelegate delegate; + + public AppNamespaceManagementApiController(@Autowired(required = false) AppNamespaceManagementApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new AppNamespaceManagementApiDelegate() {}); + } + + @Override + public AppNamespaceManagementApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java new file mode 100644 index 0000000..6cb2601 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java @@ -0,0 +1,195 @@ +package com.apollo.openapi.server.api; + +import com.apollo.openapi.server.model.ExceptionResponse; +import com.apollo.openapi.server.model.OpenAppNamespaceDTO; +import com.apollo.openapi.server.model.OpenNamespaceDTO; +import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +/** + * A delegate to be called by the {@link AppNamespaceManagementApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface AppNamespaceManagementApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/appnamespaces + * + * @param appId (required) + * @param openAppNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return AppNamespace创建成功 (status code 200) + * or 请求参数错误 (status code 400) + * or 权限不足 (status code 403) + * @see AppNamespaceManagementApi#createAppNamespace + */ + default ResponseEntity createAppNamespace(String appId, + OpenAppNamespaceDTO openAppNamespaceDTO, + String operator) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param operator 操作人用户名 (optional) + * @return AppNamespace删除成功 (status code 200) + * @see AppNamespaceManagementApi#deleteAppNamespace + */ + default ResponseEntity deleteAppNamespace(String appId, + String namespaceName, + String operator) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) + * @return 成功获取AppNamespace (status code 200) + * @see AppNamespaceManagementApi#findAppNamespace + */ + default ResponseEntity findAppNamespace(String appId, + String namespaceName, + Boolean extendInfo) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage : 查询appnamespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * + * @param appId 应用ID (required) + * @param namespaceName 命名空间名称 (required) + * @return AppNamespaceUsage查询成功 (status code 200) + * @see AppNamespaceManagementApi#findAppNamespaceUsage + */ + default ResponseEntity> findAppNamespaceUsage(String appId, + String namespaceName) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" }, { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) + * GET /openapi/v1/appnamespaces/public + * + * @return (status code 200) + * @see AppNamespaceManagementApi#getAppNamespaces + */ + default ResponseEntity> getAppNamespaces() { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/apps/{appId}/appnamespaces + * + * @param appId (required) + * @return (status code 200) + * @see AppNamespaceManagementApi#getAppNamespacesByAppId + */ + default ResponseEntity> getAppNamespacesByAppId(String appId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * + * @param env 环境标识 (required) + * @param publicNamespaceName 公共命名空间名称 (required) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取实例列表 (status code 200) + * @see AppNamespaceManagementApi#getPublicAppNamespaceInstances + */ + default ResponseEntity> getPublicAppNamespaceInstances(String env, + String publicNamespaceName, + Integer page, + Integer size) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; + 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/ItemManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java index a3852c1..0521fc2 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 @@ -7,9 +7,9 @@ import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenItemDiffDTO; import com.apollo.openapi.server.model.OpenItemPageDTO; -import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceSyncDTO; import com.apollo.openapi.server.model.OpenNamespaceTextModel; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; @@ -43,27 +43,25 @@ default ItemManagementApiDelegate getDelegate() { } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate : 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 通过文本批量修改配置项 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) * @param openNamespaceTextModel (required) + * @param operator 操作人用户名 (optional) * @return 批量更新配置项成功 (status code 200) * or 权限不足 (status code 403) */ @Operation( operationId = "batchUpdateItemsByText", summary = "通过文本批量修改配置项 (new added)", - description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:", + description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "批量更新配置项成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }), + @ApiResponse(responseCode = "200", description = "批量更新配置项成功"), @ApiResponse(responseCode = "403", description = "权限不足", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) @@ -74,41 +72,41 @@ default ItemManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.PUT, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity batchUpdateItemsByText( + default ResponseEntity batchUpdateItemsByText( @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, - @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel + @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().batchUpdateItemsByText(appId, env, clusterName, namespaceName, operator, openNamespaceTextModel); + return getDelegate().batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare : 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff : 对比命名空间配置差异 (new added) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) * @return 成功对比命名空间配置差异 (status code 200) */ @Operation( operationId = "compareItems", summary = "对比命名空间配置差异 (new added)", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare", + description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff", tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功对比命名空间配置差异", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDiffs.class))) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDiffDTO.class))) }) }, security = { @@ -117,18 +115,18 @@ default ResponseEntity batchUpdateItemsByText( ) @RequestMapping( method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff", produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity> compareItems( + default ResponseEntity> compareItems( @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 + @Parameter(name = "OpenNamespaceSyncDTO", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncDTO openNamespaceSyncDTO ) { - return getDelegate().compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncModel); + return getDelegate().compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); } @@ -140,8 +138,8 @@ default ResponseEntity> compareItems( * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -177,10 +175,10 @@ default ResponseEntity createItem( @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, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO + @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().createItem(appId, env, clusterName, namespaceName, operator, openItemDTO); + return getDelegate().createItem(appId, env, clusterName, namespaceName, openItemDTO, operator); } @@ -193,7 +191,7 @@ default ResponseEntity createItem( * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param key 配置项键名 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 配置项删除成功 (status code 200) */ @Operation( @@ -202,9 +200,7 @@ default ResponseEntity createItem( description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项删除成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) + @ApiResponse(responseCode = "200", description = "配置项删除成功") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -212,16 +208,15 @@ default ResponseEntity createItem( ) @RequestMapping( method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", - produces = { "application/json" } + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" ) - default ResponseEntity deleteItem( + default ResponseEntity deleteItem( @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, - @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) String operator ) { return getDelegate().deleteItem(appId, env, clusterName, namespaceName, key, operator); } @@ -245,9 +240,7 @@ default ResponseEntity deleteItem( description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) + @ApiResponse(responseCode = "200", description = "") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -255,10 +248,9 @@ default ResponseEntity deleteItem( ) @RequestMapping( method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", - produces = { "application/json" } + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" ) - default ResponseEntity deleteItemByEncodedKey( + default ResponseEntity deleteItemByEncodedKey( @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, @@ -271,28 +263,27 @@ default ResponseEntity deleteItemByEncodedKey( /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * * @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) + * @param branchName 分支名称 (required) + * @return 成功获取分支下的配置项列表 (status code 200) + * or 分支不存在 (status code 404) */ @Operation( - operationId = "findItemsByNamespace", - summary = "获取命名空间下的配置项列表 (original openapi)", - description = "获取指定命名空间的配置项列表,支持分页", + operationId = "findBranchItems", + summary = "获取分支下的配置项 (new added)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取配置项列表", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemPageDTO.class)) + @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) }), - @ApiResponse(responseCode = "404", description = "命名空间不存在", content = { + @ApiResponse(responseCode = "404", description = "分支不存在", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, @@ -302,43 +293,43 @@ default ResponseEntity deleteItemByEncodedKey( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", produces = { "application/json" } ) - default ResponseEntity findItemsByNamespace( + default ResponseEntity> findBranchItems( @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 @Min(0) @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Min(0) @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size + @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName ) { - return getDelegate().findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); + return getDelegate().findBranchItems(appId, env, clusterName, namespaceName, branchName); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return 成功获取分支下的配置项列表 (status code 200) - * or 分支不存在 (status code 404) + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取配置项列表 (status code 200) + * or 命名空间不存在 (status code 404) */ @Operation( - operationId = "getBranchItems", - summary = "获取分支下的配置项 (new added)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:", + operationId = "findItemsByNamespace", + summary = "获取命名空间下的配置项列表 (original openapi)", + description = "获取指定命名空间的配置项列表,支持分页", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) + @ApiResponse(responseCode = "200", description = "成功获取配置项列表", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemPageDTO.class)) }), - @ApiResponse(responseCode = "404", description = "分支不存在", content = { + @ApiResponse(responseCode = "404", description = "命名空间不存在", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, @@ -348,17 +339,18 @@ default ResponseEntity findItemsByNamespace( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", produces = { "application/json" } ) - default ResponseEntity> getBranchItems( + default ResponseEntity findItemsByNamespace( @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 @Min(0) @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, + @NotNull @Min(0) @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { - return getDelegate().getBranchItems(appId, env, clusterName, namespaceName, branchName); + return getDelegate().findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); } @@ -453,14 +445,14 @@ default ResponseEntity getItemByEncodedKey( /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert : 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation : 撤销配置项更改 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 配置项更改撤销成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -468,12 +460,10 @@ default ResponseEntity getItemByEncodedKey( @Operation( operationId = "revertItems", summary = "撤销配置项更改 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项更改撤销成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }), + @ApiResponse(responseCode = "200", description = "配置项更改撤销成功"), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @@ -487,30 +477,30 @@ default ResponseEntity getItemByEncodedKey( ) @RequestMapping( method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation", produces = { "application/json" } ) - default ResponseEntity revertItems( + default ResponseEntity revertItems( @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 + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { return getDelegate().revertItems(appId, env, clusterName, namespaceName, operator); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync : 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize : 同步配置项到多个命名空间 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项同步成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -518,12 +508,10 @@ default ResponseEntity revertItems( @Operation( operationId = "syncItems", summary = "同步配置项到多个命名空间 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项同步成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }), + @ApiResponse(responseCode = "200", description = "配置项同步成功"), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @@ -537,19 +525,63 @@ default ResponseEntity revertItems( ) @RequestMapping( method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize", produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity syncItems( + default ResponseEntity syncItems( @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 = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, - @Parameter(name = "OpenNamespaceSyncModel", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncModel openNamespaceSyncModel + @Parameter(name = "OpenNamespaceSyncDTO", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncDTO openNamespaceSyncDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator + ) { + return getDelegate().syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); + } + + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation : 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation + * + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param openNamespaceTextModel (required) + * @return 配置文本语法验证通过 (status code 200) + * or 配置文本语法错误 (status code 400) + */ + @Operation( + operationId = "syntaxCheck", + summary = "验证配置文本语法 (new added)", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation", + tags = { "Item Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "配置文本语法验证通过"), + @ApiResponse(responseCode = "400", description = "配置文本语法错误", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity syntaxCheck( + @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 = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel ) { - return getDelegate().syncItems(appId, env, clusterName, namespaceName, operator, openNamespaceSyncModel); + return getDelegate().syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel); } @@ -564,6 +596,7 @@ default ResponseEntity syncItems( * @param key (required) * @param createIfNotExists (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -575,9 +608,7 @@ default ResponseEntity syncItems( description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项更新成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }), + @ApiResponse(responseCode = "200", description = "配置项更新成功"), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @@ -598,16 +629,17 @@ default ResponseEntity syncItems( produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity updateItem( + default ResponseEntity updateItem( @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, defaultValue = "false") Boolean createIfNotExists, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO + @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); + return getDelegate().updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); } @@ -622,6 +654,7 @@ default ResponseEntity updateItem( * @param key 配置项键名(需要URL编码) (required) * @param createIfNotExists 若不存在则创建(true/false) (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项更新成功(编码key) (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -633,9 +666,7 @@ default ResponseEntity updateItem( description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", tags = { "Item Management" }, responses = { - @ApiResponse(responseCode = "200", description = "配置项更新成功(编码key)", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }), + @ApiResponse(responseCode = "200", description = "配置项更新成功(编码key)"), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @@ -656,62 +687,17 @@ default ResponseEntity updateItem( produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity updateItemByEncodedKey( + default ResponseEntity updateItemByEncodedKey( @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, defaultValue = "false") Boolean createIfNotExists, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO - ) { - return getDelegate().updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate : 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return 配置文本语法验证通过 (status code 200) - * or 配置文本语法错误 (status code 400) - */ - @Operation( - operationId = "validateItems", - summary = "验证配置文本语法 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "配置文本语法验证通过", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }), - @ApiResponse(responseCode = "400", description = "配置文本语法错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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 = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel + @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().validateItems(appId, env, clusterName, namespaceName, openNamespaceTextModel); + return getDelegate().updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); } } 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 6c87c03..e301a70 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 @@ -2,9 +2,9 @@ import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenItemDiffDTO; import com.apollo.openapi.server.model.OpenItemPageDTO; -import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceSyncDTO; import com.apollo.openapi.server.model.OpenNamespaceTextModel; 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 ab298b5..9285c81 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 @@ -2,9 +2,9 @@ import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenItemDiffs; +import com.apollo.openapi.server.model.OpenItemDiffDTO; import com.apollo.openapi.server.model.OpenItemPageDTO; -import com.apollo.openapi.server.model.OpenNamespaceSyncModel; +import com.apollo.openapi.server.model.OpenNamespaceSyncDTO; import com.apollo.openapi.server.model.OpenNamespaceTextModel; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -29,50 +29,50 @@ default Optional getRequest() { } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate : 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 通过文本批量修改配置项 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) * @param openNamespaceTextModel (required) + * @param operator 操作人用户名 (optional) * @return 批量更新配置项成功 (status code 200) * or 权限不足 (status code 403) * @see ItemManagementApi#batchUpdateItemsByText */ - default ResponseEntity batchUpdateItemsByText(String appId, + default ResponseEntity batchUpdateItemsByText(String appId, String env, String clusterName, String namespaceName, - String operator, - OpenNamespaceTextModel openNamespaceTextModel) { + OpenNamespaceTextModel openNamespaceTextModel, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare : 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff : 对比命名空间配置差异 (new added) + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) * @return 成功对比命名空间配置差异 (status code 200) * @see ItemManagementApi#compareItems */ - default ResponseEntity> compareItems(String appId, + default ResponseEntity> compareItems(String appId, String env, String clusterName, String namespaceName, - OpenNamespaceSyncModel openNamespaceSyncModel) { + OpenNamespaceSyncDTO openNamespaceSyncDTO) { 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\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, \"extInfo\" : \"extInfo\" }, { \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"diffs\" : { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, \"extInfo\" : \"extInfo\" } ]"; + String exampleString = "[ { \"code\" : 0, \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"message\" : \"message\", \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] }, { \"code\" : 0, \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"deleteItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"createItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"message\" : \"message\", \"updateItems\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -90,8 +90,8 @@ default ResponseEntity> compareItems(String appId, * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -101,12 +101,12 @@ default ResponseEntity createItem(String appId, String env, String clusterName, String namespaceName, - String operator, - OpenItemDTO openItemDTO) { + OpenItemDTO openItemDTO, + String operator) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -125,11 +125,11 @@ default ResponseEntity createItem(String appId, * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) * @param key 配置项键名 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 配置项删除成功 (status code 200) * @see ItemManagementApi#deleteItem */ - default ResponseEntity deleteItem(String appId, + default ResponseEntity deleteItem(String appId, String env, String clusterName, String namespaceName, @@ -152,7 +152,7 @@ default ResponseEntity deleteItem(String appId, * @return (status code 200) * @see ItemManagementApi#deleteItemByEncodedKey */ - default ResponseEntity deleteItemByEncodedKey(String appId, + default ResponseEntity deleteItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, @@ -163,29 +163,27 @@ default ResponseEntity deleteItemByEncodedKey(String appId, } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: * * @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#findItemsByNamespace + * @param branchName 分支名称 (required) + * @return 成功获取分支下的配置项列表 (status code 200) + * or 分支不存在 (status code 404) + * @see ItemManagementApi#findBranchItems */ - default ResponseEntity findItemsByNamespace(String appId, + default ResponseEntity> findBranchItems(String appId, String env, String clusterName, String namespaceName, - Integer page, - Integer size) { + String branchName) { 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\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ] }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -196,27 +194,29 @@ default ResponseEntity findItemsByNamespace(String appId, } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) + * 获取指定命名空间的配置项列表,支持分页 * * @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 ItemManagementApi#getBranchItems + * @param page 页码,从0开始 (required) + * @param size 每页数量 (required) + * @return 成功获取配置项列表 (status code 200) + * or 命名空间不存在 (status code 404) + * @see ItemManagementApi#findItemsByNamespace */ - default ResponseEntity> getBranchItems(String appId, + default ResponseEntity findItemsByNamespace(String appId, String env, String clusterName, String namespaceName, - String branchName) { + Integer page, + Integer size) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ]"; + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -247,7 +247,7 @@ default ResponseEntity getItem(String appId, getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -278,7 +278,7 @@ default ResponseEntity getItemByEncodedKey(String appId, getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -289,20 +289,20 @@ default ResponseEntity getItemByEncodedKey(String appId, } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert : 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation : 撤销配置项更改 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * * @param appId (required) * @param env (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 配置项更改撤销成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * @see ItemManagementApi#revertItems */ - default ResponseEntity revertItems(String appId, + default ResponseEntity revertItems(String appId, String env, String clusterName, String namespaceName, @@ -312,26 +312,48 @@ default ResponseEntity revertItems(String appId, } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync : 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize : 同步配置项到多个命名空间 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName (required) * @param namespaceName (required) - * @param operator 操作人用户名 (required) - * @param openNamespaceSyncModel (required) + * @param openNamespaceSyncDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项同步成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * @see ItemManagementApi#syncItems */ - default ResponseEntity syncItems(String appId, + default ResponseEntity syncItems(String appId, + String env, + String clusterName, + String namespaceName, + OpenNamespaceSyncDTO openNamespaceSyncDTO, + String operator) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation : 验证配置文本语法 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation + * + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param namespaceName (required) + * @param openNamespaceTextModel (required) + * @return 配置文本语法验证通过 (status code 200) + * or 配置文本语法错误 (status code 400) + * @see ItemManagementApi#syntaxCheck + */ + default ResponseEntity syntaxCheck(String appId, String env, String clusterName, String namespaceName, - String operator, - OpenNamespaceSyncModel openNamespaceSyncModel) { + OpenNamespaceTextModel openNamespaceTextModel) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -347,19 +369,21 @@ default ResponseEntity syncItems(String appId, * @param key (required) * @param createIfNotExists (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * or 配置项不存在 (status code 404) * @see ItemManagementApi#updateItem */ - default ResponseEntity updateItem(String appId, + default ResponseEntity updateItem(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, - OpenItemDTO openItemDTO) { + OpenItemDTO openItemDTO, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -375,41 +399,21 @@ default ResponseEntity updateItem(String appId, * @param key 配置项键名(需要URL编码) (required) * @param createIfNotExists 若不存在则创建(true/false) (required) * @param openItemDTO (required) + * @param operator 操作人用户名 (optional) * @return 配置项更新成功(编码key) (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * or 配置项不存在 (status code 404) * @see ItemManagementApi#updateItemByEncodedKey */ - default ResponseEntity updateItemByEncodedKey(String appId, + default ResponseEntity updateItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, - OpenItemDTO openItemDTO) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate : 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return 配置文本语法验证通过 (status code 200) - * or 配置文本语法错误 (status code 400) - * @see ItemManagementApi#validateItems - */ - default ResponseEntity validateItems(String appId, - String env, - String clusterName, - String namespaceName, - OpenNamespaceTextModel openNamespaceTextModel) { + OpenItemDTO openItemDTO, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } 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 203fa96..a87ee4f 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 @@ -34,7 +34,7 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") @Validated -@Tag(name = "Namespace Branch Management", description = "the Namespace Branch Management API") +@Tag(name = "Namespace Branch Management", description = "命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能") public interface NamespaceBranchManagementApi { default NamespaceBranchManagementApiDelegate getDelegate() { @@ -49,7 +49,7 @@ default NamespaceBranchManagementApiDelegate getDelegate() { * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 命名空间分支创建成功 (status code 200) */ @Operation( @@ -76,7 +76,7 @@ default ResponseEntity createBranch( @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 + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { return getDelegate().createBranch(appId, env, clusterName, namespaceName, operator); } @@ -100,9 +100,7 @@ default ResponseEntity createBranch( description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", tags = { "Namespace Branch Management" }, responses = { - @ApiResponse(responseCode = "200", description = "分支删除成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) + @ApiResponse(responseCode = "200", description = "分支删除成功") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -110,10 +108,9 @@ default ResponseEntity createBranch( ) @RequestMapping( method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", - produces = { "application/json" } + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" ) - default ResponseEntity deleteBranch( + default ResponseEntity deleteBranch( @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, @@ -133,6 +130,7 @@ default ResponseEntity deleteBranch( * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) * @return 成功获取分支信息 (status code 200) * or 分支不存在 (status code 404) */ @@ -162,9 +160,10 @@ default ResponseEntity findBranch( @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 = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo ) { - return getDelegate().findBranch(appId, env, clusterName, namespaceName); + return getDelegate().findBranch(appId, env, clusterName, namespaceName, extendInfo); } @@ -210,8 +209,62 @@ default ResponseEntity getBranchGrayRules( /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * + * @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 = "merge", + summary = "合并分支 (original openapi)", + description = "合并灰度分支并可选择删除分支", + 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 = ExceptionResponse.class)) + }), + @ApiResponse(responseCode = "403", description = "权限不足", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge", + produces = { "application/json" }, + consumes = { "application/json" } + ) + default ResponseEntity merge( + @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().merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); + } + + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * * @param env 环境标识 (required) * @param appId 应用ID (required) @@ -219,14 +272,14 @@ default ResponseEntity getBranchGrayRules( * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) + * @param operator 操作人用户名 (optional) * @return 分支合并成功 (status code 200) */ @Operation( operationId = "mergeBranch", summary = "合并分支到主分支 (new added)", - description = "PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\")", + description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", tags = { "Namespace Branch Management" }, responses = { @ApiResponse(responseCode = "200", description = "分支合并成功", content = { @@ -238,7 +291,7 @@ default ResponseEntity getBranchGrayRules( } ) @RequestMapping( - method = RequestMethod.PATCH, + method = RequestMethod.POST, value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", produces = { "application/json" }, consumes = { "application/json" } @@ -250,10 +303,10 @@ default ResponseEntity mergeBranch( @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, - @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO + @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, operator, namespaceReleaseDTO); + return getDelegate().mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); } @@ -276,9 +329,7 @@ default ResponseEntity mergeBranch( 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 = Object.class)) - }) + @ApiResponse(responseCode = "200", description = "灰度规则更新成功") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -287,10 +338,9 @@ default ResponseEntity mergeBranch( @RequestMapping( method = RequestMethod.PUT, value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", - produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity updateBranchRules( + default ResponseEntity updateBranchRules( @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, 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 46360ac..dd360f1 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 @@ -35,7 +35,7 @@ default Optional getRequest() { * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 命名空间分支创建成功 (status code 200) * @see NamespaceBranchManagementApi#createBranch */ @@ -47,7 +47,7 @@ default ResponseEntity createBranch(String appId, getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -70,7 +70,7 @@ default ResponseEntity createBranch(String appId, * @return 分支删除成功 (status code 200) * @see NamespaceBranchManagementApi#deleteBranch */ - default ResponseEntity deleteBranch(String env, + default ResponseEntity deleteBranch(String env, String appId, String clusterName, String namespaceName, @@ -88,6 +88,7 @@ default ResponseEntity deleteBranch(String env, * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) + * @param extendInfo (optional, default to false) * @return 成功获取分支信息 (status code 200) * or 分支不存在 (status code 404) * @see NamespaceBranchManagementApi#findBranch @@ -95,11 +96,12 @@ default ResponseEntity deleteBranch(String env, default ResponseEntity findBranch(String appId, String env, String clusterName, - String namespaceName) { + String namespaceName, + Boolean extendInfo) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -140,8 +142,44 @@ default ResponseEntity getBranchGrayRules(String appId, } /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) + * 合并灰度分支并可选择删除分支 + * + * @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#merge + */ + default ResponseEntity merge(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\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * * @param env 环境标识 (required) * @param appId 应用ID (required) @@ -149,8 +187,8 @@ default ResponseEntity getBranchGrayRules(String appId, * @param namespaceName 命名空间名称 (required) * @param branchName 分支名称 (required) * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param operator 操作人用户名 (required) * @param namespaceReleaseDTO (required) + * @param operator 操作人用户名 (optional) * @return 分支合并成功 (status code 200) * @see NamespaceBranchManagementApi#mergeBranch */ @@ -160,8 +198,8 @@ default ResponseEntity mergeBranch(String env, String namespaceName, String branchName, Boolean deleteBranch, - String operator, - NamespaceReleaseDTO namespaceReleaseDTO) { + NamespaceReleaseDTO namespaceReleaseDTO, + String operator) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -189,7 +227,7 @@ default ResponseEntity mergeBranch(String env, * @return 灰度规则更新成功 (status code 200) * @see NamespaceBranchManagementApi#updateBranchRules */ - default ResponseEntity updateBranchRules(String appId, + default ResponseEntity updateBranchRules(String appId, String env, String clusterName, String namespaceName, diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java new file mode 100644 index 0000000..fbeb129 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java @@ -0,0 +1,78 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (6.6.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package com.apollo.openapi.server.api; + +import com.apollo.openapi.server.model.OpenNamespaceLockDTO; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Validated +@Tag(name = "Namespace Lock Management", description = "命名空间锁管理相关接口") +public interface NamespaceLockManagementApi { + + default NamespaceLockManagementApiDelegate getDelegate() { + return new NamespaceLockManagementApiDelegate() {}; + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) + * 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 (status code 200) + */ + @Operation( + operationId = "getNamespaceLock", + summary = "获取Namespace的锁状态 (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", + tags = { "Namespace Lock Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceLockDTO.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", + produces = { "application/json" } + ) + default ResponseEntity getNamespaceLock( + @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().getNamespaceLock(appId, env, clusterName, namespaceName); + } + +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java new file mode 100644 index 0000000..3cac1a4 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java @@ -0,0 +1,44 @@ +package com.apollo.openapi.server.api; + +import com.apollo.openapi.server.model.OpenNamespaceLockDTO; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.CookieValue; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +@Controller +@RequestMapping("${openapi.apolloOpen.base-path:}") +public class NamespaceLockManagementApiController implements NamespaceLockManagementApi { + + private final NamespaceLockManagementApiDelegate delegate; + + public NamespaceLockManagementApiController(@Autowired(required = false) NamespaceLockManagementApiDelegate delegate) { + this.delegate = Optional.ofNullable(delegate).orElse(new NamespaceLockManagementApiDelegate() {}); + } + + @Override + public NamespaceLockManagementApiDelegate getDelegate() { + return delegate; + } + +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java new file mode 100644 index 0000000..3749fec --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java @@ -0,0 +1,54 @@ +package com.apollo.openapi.server.api; + +import com.apollo.openapi.server.model.OpenNamespaceLockDTO; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +/** + * A delegate to be called by the {@link NamespaceLockManagementApiController}}. + * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. + */ +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public interface NamespaceLockManagementApiDelegate { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) + * 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 (status code 200) + * @see NamespaceLockManagementApi#getNamespaceLock + */ + default ResponseEntity getNamespaceLock(String appId, + String env, + String clusterName, + String namespaceName) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"lockedBy\" : \"lockedBy\", \"isLocked\" : true, \"namespaceName\" : \"namespaceName\", \"isEmergencyPublishAllowed\" : true }"; + 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/NamespaceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java index 9cff7d2..f42ed7a 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 @@ -5,10 +5,10 @@ */ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppNamespaceDTO; +import java.util.List; +import com.apollo.openapi.server.model.OpenCreateNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceLockDTO; +import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -41,22 +41,23 @@ default NamespaceManagementApiDelegate getDelegate() { } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 创建缺失的Namespace (new added) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @return 缺失的命名空间名称列表 (status code 200) + * @param operator 操作人用户名 (optional) + * @return 缺失的命名空间创建成功 (status code 200) */ @Operation( - operationId = "checkNamespaceIntegrity", - summary = "检查缺失的Namespace (new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check", + operationId = "createMissingNamespaces", + summary = "创建缺失的Namespace (new added)", + description = "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "缺失的命名空间名称列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) + @ApiResponse(responseCode = "200", description = "缺失的命名空间创建成功", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }) }, security = { @@ -64,44 +65,35 @@ default NamespaceManagementApiDelegate getDelegate() { } ) @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check", + method = RequestMethod.POST, + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", produces = { "application/json" } ) - default ResponseEntity> checkNamespaceIntegrity( + default ResponseEntity createMissingNamespaces( @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 = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().checkNamespaceIntegrity(appId, env, clusterName); + return getDelegate().createMissingNamespaces(appId, env, clusterName, operator); } /** - * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces + * POST /openapi/v1/namespaces : 创建Namespace (new added) + * POST /openapi/v1/apps/{appId}/namespaces * - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return AppNamespace创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) + * @param openCreateNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return Namespace创建成功 (status code 200) */ @Operation( - operationId = "createNamespace", - summary = "创建AppNamespace (original openapi)", - description = "POST /openapi/v1/apps/{appId}/appnamespaces", + operationId = "createNamespaces", + summary = "创建Namespace (new added)", + description = "POST /openapi/v1/apps/{appId}/namespaces", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "AppNamespace创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) + @ApiResponse(responseCode = "200", description = "Namespace创建成功") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -109,36 +101,35 @@ default ResponseEntity> checkNamespaceIntegrity( ) @RequestMapping( method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/appnamespaces", - produces = { "application/json" }, + value = "/openapi/v1/namespaces", consumes = { "application/json" } ) - default ResponseEntity createNamespace( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "OpenAppNamespaceDTO", description = "", required = true) @Valid @RequestBody OpenAppNamespaceDTO openAppNamespaceDTO + default ResponseEntity createNamespaces( + @Parameter(name = "OpenCreateNamespaceDTO", description = "", required = true) @Valid @RequestBody List openCreateNamespaceDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().createNamespace(appId, openAppNamespaceDTO); + return getDelegate().createNamespaces(openCreateNamespaceDTO, operator); } /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} : 删除指定的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} * * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return AppNamespace删除成功 (status code 200) + * @param operator 操作人用户名 (optional) + * @return 解除关联成功 (status code 200) */ @Operation( - operationId = "deleteAppNamespace", - summary = "删除AppNamespace (new added)", - description = "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + operationId = "deleteNamespace", + summary = "删除指定的Namespace (new added)", + description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "AppNamespace删除成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) + @ApiResponse(responseCode = "200", description = "解除关联成功") }, security = { @SecurityRequirement(name = "ApiKeyAuth") @@ -146,37 +137,36 @@ default ResponseEntity createNamespace( ) @RequestMapping( method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", - produces = { "application/json" } + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" ) - default ResponseEntity deleteAppNamespace( + default ResponseEntity deleteNamespace( @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 = "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) String operator ) { - return getDelegate().deleteAppNamespace(appId, namespaceName, operator); + return getDelegate().deleteNamespace(appId, env, clusterName, namespaceName, operator); } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 查找缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return 解除关联成功 (status code 200) + * @return 缺失的命名空间名称列表 (status code 200) */ @Operation( - operationId = "deleteNamespaceLinks", - summary = "删除关联的Namespace (new added)", - description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links", + operationId = "findMissingNamespaces", + summary = "查找缺失的Namespace (new added)", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", tags = { "Namespace 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", array = @ArraySchema(schema = @Schema(implementation = String.class))) }) }, security = { @@ -184,39 +174,39 @@ default ResponseEntity deleteAppNamespace( } ) @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links", + method = RequestMethod.GET, + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", produces = { "application/json" } ) - default ResponseEntity deleteNamespaceLinks( + default ResponseEntity> findMissingNamespaces( @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 = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator + @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName ) { - return getDelegate().deleteNamespaceLinks(appId, env, clusterName, namespaceName, operator); + return getDelegate().findMissingNamespaces(appId, env, clusterName); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) + * 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 extendInfo (optional, default to false) * @return (status code 200) */ @Operation( - operationId = "findNamespaces", - summary = "获取指定集群下的所有Namespace (original openapi)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", + operationId = "findNamespace", + summary = "获取指定的Namespace (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", tags = { "Namespace Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, security = { @@ -225,35 +215,39 @@ default ResponseEntity deleteNamespaceLinks( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", produces = { "application/json" } ) - default ResponseEntity> findNamespaces( + default ResponseEntity findNamespace( @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, - @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail + @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail, + @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo ) { - return getDelegate().findNamespaces(appId, env, clusterName, fillItemDetail); + return getDelegate().findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage : 查询namespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage * * @param appId 应用ID (required) + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @return 成功获取AppNamespace (status code 200) + * @return NamespaceUsage查询成功 (status code 200) */ @Operation( - operationId = "getAppNamespace", - summary = "获取指定的AppNamespace (new added)", - description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + operationId = "findNamespaceUsage", + summary = "查询namespace使用情况(new added)", + description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取AppNamespace", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) + @ApiResponse(responseCode = "200", description = "NamespaceUsage查询成功", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceUsageDTO.class))) }) }, security = { @@ -262,65 +256,38 @@ default ResponseEntity> findNamespaces( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", + value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage", produces = { "application/json" } ) - default ResponseEntity getAppNamespace( + default ResponseEntity> findNamespaceUsage( @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().getAppNamespace(appId, namespaceName); - } - - - /** - * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces?public=true - * - * @param publicOnly (required) - * @return (status code 200) - */ - @Operation( - operationId = "getAppNamespaces", - summary = "获取所有公共AppNamespace (new added)", - description = "GET /openapi/v1/appnamespaces?public=true", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/appnamespaces", - produces = { "application/json" } - ) - default ResponseEntity> getAppNamespaces( - @NotNull @Parameter(name = "publicOnly", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "publicOnly", required = true) Boolean publicOnly - ) { - return getDelegate().getAppNamespaces(publicOnly); + return getDelegate().findNamespaceUsage(appId, env, clusterName, namespaceName); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces * * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) * @return (status code 200) */ @Operation( - operationId = "getAppNamespacesByApp", - summary = "获取指定应用的AppNamespace (new added)", - description = "GET /openapi/v1/apps/{appId}/appnamespaces", + operationId = "findNamespaces", + summary = "获取指定集群下的所有Namespace (original openapi)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", tags = { "Namespace Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) }) }, security = { @@ -329,34 +296,39 @@ default ResponseEntity> getAppNamespaces( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/appnamespaces", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", produces = { "application/json" } ) - default ResponseEntity> getAppNamespacesByApp( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + default ResponseEntity> findNamespaces( + @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, + @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail, + @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo ) { - return getDelegate().getAppNamespacesByApp(appId); + return getDelegate().findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace : 查询关联Namespace对应的公共Namespace详情 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 关联Namespace名称 (required) + * @param extendInfo (optional, default to false) + * @return 成功获取关联的公共Namespace详情 (status code 200) */ @Operation( - operationId = "getNamespaceLock", - summary = "获取Namespace的锁状态 (original openapi)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", + operationId = "findPublicNamespaceForAssociatedNamespace", + summary = "查询关联Namespace对应的公共Namespace详情 (new added)", + description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace", tags = { "Namespace Management" }, responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceLockDTO.class)) + @ApiResponse(responseCode = "200", description = "成功获取关联的公共Namespace详情", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }) }, security = { @@ -365,16 +337,17 @@ default ResponseEntity> getAppNamespacesByApp( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", + value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace", produces = { "application/json" } ) - default ResponseEntity getNamespaceLock( - @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 findPublicNamespaceForAssociatedNamespace( + @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 = "关联Namespace名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, + @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo ) { - return getDelegate().getNamespaceLock(appId, env, clusterName, namespaceName); + return getDelegate().findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo); } @@ -408,123 +381,4 @@ default ResponseEntity>> getNamespacesReleaseSt return getDelegate().getNamespacesReleaseStatus(appId); } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取实例列表 (status code 200) - */ - @Operation( - operationId = "getPublicAppNamespaceInstances", - summary = "获取公共AppNamespace的所有实例 (new added)", - description = "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取实例列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", - produces = { "application/json" } - ) - default ResponseEntity> getPublicAppNamespaceInstances( - @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().getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功获取关联的公共Namespace (status code 200) - */ - @Operation( - operationId = "getPublicNamespaceAssociation", - summary = "获取关联的公共Namespace (new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取关联的公共Namespace", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association", - produces = { "application/json" } - ) - default ResponseEntity getPublicNamespaceAssociation( - @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().getPublicNamespaceAssociation(appId, env, clusterName, namespaceName); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) - * 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 (status code 200) - */ - @Operation( - operationId = "loadNamespace", - summary = "获取指定的Namespace (original openapi)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", - produces = { "application/json" } - ) - default ResponseEntity loadNamespace( - @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 = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail - ) { - return getDelegate().loadNamespace(appId, env, clusterName, namespaceName, fillItemDetail); - } - } 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 0eb3cb9..c0bb4be 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 @@ -1,9 +1,9 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppNamespaceDTO; +import java.util.List; +import com.apollo.openapi.server.model.OpenCreateNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceLockDTO; +import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; import org.springframework.beans.factory.annotation.Autowired; 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 75ba776..b2fb556 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 @@ -1,9 +1,9 @@ package com.apollo.openapi.server.api; -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppNamespaceDTO; +import java.util.List; +import com.apollo.openapi.server.model.OpenCreateNamespaceDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceLockDTO; +import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -27,87 +27,52 @@ default Optional getRequest() { } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check : 检查缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 创建缺失的Namespace (new added) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) - * @return 缺失的命名空间名称列表 (status code 200) - * @see NamespaceManagementApi#checkNamespaceIntegrity + * @param operator 操作人用户名 (optional) + * @return 缺失的命名空间创建成功 (status code 200) + * @see NamespaceManagementApi#createMissingNamespaces */ - default ResponseEntity> checkNamespaceIntegrity(String appId, + default ResponseEntity createMissingNamespaces(String appId, String env, - String clusterName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"\", \"\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @return AppNamespace创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see NamespaceManagementApi#createNamespace - */ - default ResponseEntity createNamespace(String appId, - OpenAppNamespaceDTO openAppNamespaceDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + String clusterName, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * POST /openapi/v1/namespaces : 创建Namespace (new added) + * POST /openapi/v1/apps/{appId}/namespaces * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) - * @return AppNamespace删除成功 (status code 200) - * @see NamespaceManagementApi#deleteAppNamespace + * @param openCreateNamespaceDTO (required) + * @param operator 操作人用户名 (optional) + * @return Namespace创建成功 (status code 200) + * @see NamespaceManagementApi#createNamespaces */ - default ResponseEntity deleteAppNamespace(String appId, - String namespaceName, + default ResponseEntity createNamespaces(List openCreateNamespaceDTO, String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links : 删除关联的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} : 删除指定的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} * * @param appId 应用ID (required) * @param env 环境标识 (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 解除关联成功 (status code 200) - * @see NamespaceManagementApi#deleteNamespaceLinks + * @see NamespaceManagementApi#deleteNamespace */ - default ResponseEntity deleteNamespaceLinks(String appId, + default ResponseEntity deleteNamespace(String appId, String env, String clusterName, String namespaceName, @@ -117,92 +82,22 @@ default ResponseEntity deleteNamespaceLinks(String appId, } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @return (status code 200) - * @see NamespaceManagementApi#findNamespaces - */ - default ResponseEntity> findNamespaces(String appId, - String env, - String clusterName, - Boolean fillItemDetail) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 查找缺失的Namespace (new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces * * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功获取AppNamespace (status code 200) - * @see NamespaceManagementApi#getAppNamespace - */ - default ResponseEntity getAppNamespace(String appId, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces?public=true - * - * @param publicOnly (required) - * @return (status code 200) - * @see NamespaceManagementApi#getAppNamespaces - */ - default ResponseEntity> getAppNamespaces(Boolean publicOnly) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * - * @param appId (required) - * @return (status code 200) - * @see NamespaceManagementApi#getAppNamespacesByApp + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @return 缺失的命名空间名称列表 (status code 200) + * @see NamespaceManagementApi#findMissingNamespaces */ - default ResponseEntity> getAppNamespacesByApp(String appId) { + default ResponseEntity> findMissingNamespaces(String appId, + String env, + String clusterName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; + String exampleString = "[ \"\", \"\" ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -213,24 +108,28 @@ default ResponseEntity> getAppNamespacesByApp(String a } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) + * 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 extendInfo (optional, default to false) * @return (status code 200) - * @see NamespaceManagementApi#getNamespaceLock + * @see NamespaceManagementApi#findNamespace */ - default ResponseEntity getNamespaceLock(String appId, + default ResponseEntity findNamespace(String appId, String env, String clusterName, - String namespaceName) { + String namespaceName, + Boolean fillItemDetail, + Boolean extendInfo) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"lockedBy\" : \"lockedBy\", \"isLocked\" : true, \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -241,18 +140,24 @@ default ResponseEntity getNamespaceLock(String appId, } /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 (new added) - * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage : 查询namespace使用情况(new added) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage * * @param appId 应用ID (required) - * @return 成功获取发布状态映射 (status code 200) - * @see NamespaceManagementApi#getNamespacesReleaseStatus + * @param env 环境标识 (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @return NamespaceUsage查询成功 (status code 200) + * @see NamespaceManagementApi#findNamespaceUsage */ - default ResponseEntity>> getNamespacesReleaseStatus(String appId) { + default ResponseEntity> findNamespaceUsage(String appId, + String env, + String clusterName, + String namespaceName) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"projectA\" : { \"featureX\" : true, \"featureY\" : false }, \"projectB\" : { \"darkMode\" : true } }"; + String exampleString = "[ { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" }, { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -263,24 +168,26 @@ default ResponseEntity>> getNamespacesReleaseSt } /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces * - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取实例列表 (status code 200) - * @see NamespaceManagementApi#getPublicAppNamespaceInstances + * @param appId (required) + * @param env (required) + * @param clusterName (required) + * @param fillItemDetail (required) + * @param extendInfo (optional, default to false) + * @return (status code 200) + * @see NamespaceManagementApi#findNamespaces */ - default ResponseEntity> getPublicAppNamespaceInstances(String env, - String publicNamespaceName, - Integer page, - Integer size) { + default ResponseEntity> findNamespaces(String appId, + String env, + String clusterName, + Boolean fillItemDetail, + Boolean extendInfo) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -291,24 +198,26 @@ default ResponseEntity> getPublicAppNamespaceInstances(St } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association : 获取关联的公共Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace : 查询关联Namespace对应的公共Namespace详情 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace * - * @param appId 应用ID (required) * @param env 环境标识 (required) + * @param appId 应用ID (required) * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功获取关联的公共Namespace (status code 200) - * @see NamespaceManagementApi#getPublicNamespaceAssociation + * @param namespaceName 关联Namespace名称 (required) + * @param extendInfo (optional, default to false) + * @return 成功获取关联的公共Namespace详情 (status code 200) + * @see NamespaceManagementApi#findPublicNamespaceForAssociatedNamespace */ - default ResponseEntity getPublicNamespaceAssociation(String appId, - String env, + default ResponseEntity findPublicNamespaceForAssociatedNamespace(String env, + String appId, String clusterName, - String namespaceName) { + String namespaceName, + Boolean extendInfo) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 6, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -319,26 +228,18 @@ default ResponseEntity getPublicNamespaceAssociation(String ap } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * GET /openapi/v1/apps/{appId}/namespaces/releases/status : 获取应用下所有Namespace的发布状态 (new added) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @return (status code 200) - * @see NamespaceManagementApi#loadNamespace + * @param appId 应用ID (required) + * @return 成功获取发布状态映射 (status code 200) + * @see NamespaceManagementApi#getNamespacesReleaseStatus */ - default ResponseEntity loadNamespace(String appId, - String env, - String clusterName, - String namespaceName, - Boolean fillItemDetail) { + default ResponseEntity>> getNamespacesReleaseStatus(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"comment\" : \"comment\", \"type\" : 0, \"value\" : \"value\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"key\" : \"key\" } ], \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; + String exampleString = "{ \"projectA\" : { \"featureX\" : true, \"featureY\" : false }, \"projectB\" : { \"darkMode\" : true } }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } 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 4effee3..ba06f55 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 @@ -343,67 +343,13 @@ default ResponseEntity loadLatestActiveRelease( } - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * - * @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 = "merge", - summary = "合并分支 (original openapi)", - description = "合并灰度分支并可选择删除分支", - tags = { "Release 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 = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity merge( - @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().merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - } - - /** * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 (original openapi) * 回滚到指定的发布版本 * * @param env 环境标识 (required) * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 发布回滚成功 (status code 200) */ @Operation( @@ -428,7 +374,7 @@ default ResponseEntity merge( default ResponseEntity rollback( @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") Long releaseId, - @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) String operator ) { return getDelegate().rollback(env, releaseId, operator); } 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 cd365bf..ad98a8c 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 @@ -240,49 +240,13 @@ default ResponseEntity loadLatestActiveRelease(String appId, } - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * - * @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 ReleaseManagementApi#merge - */ - default ResponseEntity merge(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\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - /** * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 (original openapi) * 回滚到指定的发布版本 * * @param env 环境标识 (required) * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 发布回滚成功 (status code 200) * @see ReleaseManagementApi#rollback */ diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java deleted file mode 100644 index 1ed2b52..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/MultiResponseEntity.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.RichResponseEntity; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.ArrayList; -import java.util.List; -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; - -/** - * A response container holding multiple RichResponseEntity objects - */ - -@Schema(name = "MultiResponseEntity", description = "A response container holding multiple RichResponseEntity objects") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class MultiResponseEntity { - - private Integer code; - - @Valid - private List<@Valid RichResponseEntity> entities = new ArrayList<>(); - - /** - * Default constructor - * @deprecated Use {@link MultiResponseEntity#MultiResponseEntity(Integer, List<@Valid RichResponseEntity>)} - */ - @Deprecated - public MultiResponseEntity() { - super(); - } - - /** - * Constructor with only required parameters - */ - public MultiResponseEntity(Integer code, List<@Valid RichResponseEntity> entities) { - this.code = code; - this.entities = entities; - } - - public MultiResponseEntity code(Integer code) { - this.code = code; - return this; - } - - /** - * Overall HTTP status code - * @return code - */ - @NotNull - @Schema(name = "code", example = "200", description = "Overall HTTP status code", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("code") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public MultiResponseEntity entities(List<@Valid RichResponseEntity> entities) { - this.entities = entities; - return this; - } - - public MultiResponseEntity addEntitiesItem(RichResponseEntity entitiesItem) { - if (this.entities == null) { - this.entities = new ArrayList<>(); - } - this.entities.add(entitiesItem); - return this; - } - - /** - * List of rich response entities - * @return entities - */ - @NotNull @Valid - @Schema(name = "entities", description = "List of rich response entities", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("entities") - public List<@Valid RichResponseEntity> getEntities() { - return entities; - } - - public void setEntities(List<@Valid RichResponseEntity> entities) { - this.entities = entities; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MultiResponseEntity multiResponseEntity = (MultiResponseEntity) o; - return Objects.equals(this.code, multiResponseEntity.code) && - Objects.equals(this.entities, multiResponseEntity.entities); - } - - @Override - public int hashCode() { - return Objects.hash(code, entities); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MultiResponseEntity {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" entities: ").append(toIndentedString(entities)).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/OpenCreateItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateItemDTO.java new file mode 100644 index 0000000..4969fff --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateItemDTO.java @@ -0,0 +1,154 @@ +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.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; + +/** + * OpenCreateItemDTO + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenCreateItemDTO { + + private String key; + + private Integer type; + + private String value; + + private String comment; + + public OpenCreateItemDTO key(String key) { + this.key = key; + return this; + } + + /** + * 配置项的键名,在同一命名空间内唯一标识一个配置项 + * @return key + */ + + @Schema(name = "key", description = "配置项的键名,在同一命名空间内唯一标识一个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("key") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public OpenCreateItemDTO type(Integer type) { + this.type = type; + return this; + } + + /** + * 配置项类型,0表示普通配置项,1表示文件类型配置项 + * @return type + */ + + @Schema(name = "type", description = "配置项类型,0表示普通配置项,1表示文件类型配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public OpenCreateItemDTO value(String value) { + this.value = value; + return this; + } + + /** + * 配置项的值,可以是字符串、数字、JSON等格式 + * @return value + */ + + @Schema(name = "value", description = "配置项的值,可以是字符串、数字、JSON等格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("value") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public OpenCreateItemDTO comment(String comment) { + this.comment = comment; + return this; + } + + /** + * 配置项的注释说明,用于描述配置项的用途和含义 + * @return comment + */ + + @Schema(name = "comment", description = "配置项的注释说明,用于描述配置项的用途和含义", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("comment") + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenCreateItemDTO openCreateItemDTO = (OpenCreateItemDTO) o; + return Objects.equals(this.key, openCreateItemDTO.key) && + Objects.equals(this.type, openCreateItemDTO.type) && + Objects.equals(this.value, openCreateItemDTO.value) && + Objects.equals(this.comment, openCreateItemDTO.comment); + } + + @Override + public int hashCode() { + return Objects.hash(key, type, value, comment); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenCreateItemDTO {\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 "); + } +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java new file mode 100644 index 0000000..76a421c --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java @@ -0,0 +1,155 @@ +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.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; + +/** + * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + */ + +@Schema(name = "OpenCreateNamespaceDTO", description = "Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenCreateNamespaceDTO { + + private String appId; + + private String env; + + private String clusterName; + + private String appNamespaceName; + + public OpenCreateNamespaceDTO appId(String appId) { + this.appId = appId; + return this; + } + + /** + * 所属应用的唯一标识符 + * @return appId + */ + + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("appId") + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public OpenCreateNamespaceDTO env(String env) { + this.env = env; + return this; + } + + /** + * 所在那个环境创建 + * @return env + */ + + @Schema(name = "env", description = "所在那个环境创建", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("env") + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public OpenCreateNamespaceDTO clusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * 所属集群的名称 + * @return clusterName + */ + + @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("clusterName") + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public OpenCreateNamespaceDTO appNamespaceName(String appNamespaceName) { + this.appNamespaceName = appNamespaceName; + return this; + } + + /** + * 根据已创建的appnamespace来实例化namespace + * @return appNamespaceName + */ + + @Schema(name = "appNamespaceName", description = "根据已创建的appnamespace来实例化namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("appNamespaceName") + public String getAppNamespaceName() { + return appNamespaceName; + } + + public void setAppNamespaceName(String appNamespaceName) { + this.appNamespaceName = appNamespaceName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenCreateNamespaceDTO openCreateNamespaceDTO = (OpenCreateNamespaceDTO) o; + return Objects.equals(this.appId, openCreateNamespaceDTO.appId) && + Objects.equals(this.env, openCreateNamespaceDTO.env) && + Objects.equals(this.clusterName, openCreateNamespaceDTO.clusterName) && + Objects.equals(this.appNamespaceName, openCreateNamespaceDTO.appNamespaceName); + } + + @Override + public int hashCode() { + return Objects.hash(appId, env, clusterName, appNamespaceName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenCreateNamespaceDTO {\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(" appNamespaceName: ").append(toIndentedString(appNamespaceName)).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/OpenGrayReleaseRuleDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java index 9d39946..fa7225e 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 @@ -5,8 +5,9 @@ import com.apollo.openapi.server.model.OpenGrayReleaseRuleItemDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.ArrayList; -import java.util.List; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.LinkedHashSet; +import java.util.Set; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -42,7 +43,7 @@ public class OpenGrayReleaseRuleDTO { private String branchName; @Valid - private List<@Valid OpenGrayReleaseRuleItemDTO> ruleItems; + private Set<@Valid OpenGrayReleaseRuleItemDTO> ruleItems; public OpenGrayReleaseRuleDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; @@ -204,14 +205,14 @@ public void setBranchName(String branchName) { this.branchName = branchName; } - public OpenGrayReleaseRuleDTO ruleItems(List<@Valid OpenGrayReleaseRuleItemDTO> ruleItems) { + public OpenGrayReleaseRuleDTO ruleItems(Set<@Valid OpenGrayReleaseRuleItemDTO> ruleItems) { this.ruleItems = ruleItems; return this; } public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleItemsItem) { if (this.ruleItems == null) { - this.ruleItems = new ArrayList<>(); + this.ruleItems = new LinkedHashSet<>(); } this.ruleItems.add(ruleItemsItem); return this; @@ -224,11 +225,12 @@ public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleIt @Valid @Schema(name = "ruleItems", description = "灰度发布规则项列表,包含具体的灰度规则条件", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("ruleItems") - public List<@Valid OpenGrayReleaseRuleItemDTO> getRuleItems() { + public Set<@Valid OpenGrayReleaseRuleItemDTO> getRuleItems() { return ruleItems; } - public void setRuleItems(List<@Valid OpenGrayReleaseRuleItemDTO> ruleItems) { + @JsonDeserialize(as = LinkedHashSet.class) + public void setRuleItems(Set<@Valid OpenGrayReleaseRuleItemDTO> ruleItems) { this.ruleItems = ruleItems; } 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 4045a2d..6539acd 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 @@ -4,8 +4,9 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.ArrayList; -import java.util.List; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.LinkedHashSet; +import java.util.Set; import org.openapitools.jackson.nullable.JsonNullable; import java.time.OffsetDateTime; import javax.validation.Valid; @@ -27,10 +28,10 @@ public class OpenGrayReleaseRuleItemDTO { private String clientAppId; @Valid - private List clientIpList; + private Set clientIpList; @Valid - private List clientLabelList; + private Set clientLabelList; public OpenGrayReleaseRuleItemDTO clientAppId(String clientAppId) { this.clientAppId = clientAppId; @@ -52,14 +53,14 @@ public void setClientAppId(String clientAppId) { this.clientAppId = clientAppId; } - public OpenGrayReleaseRuleItemDTO clientIpList(List clientIpList) { + public OpenGrayReleaseRuleItemDTO clientIpList(Set clientIpList) { this.clientIpList = clientIpList; return this; } public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { if (this.clientIpList == null) { - this.clientIpList = new ArrayList<>(); + this.clientIpList = new LinkedHashSet<>(); } this.clientIpList.add(clientIpListItem); return this; @@ -72,22 +73,23 @@ public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { @Schema(name = "clientIpList", description = "客户端IP地址列表,指定哪些IP地址可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientIpList") - public List getClientIpList() { + public Set getClientIpList() { return clientIpList; } - public void setClientIpList(List clientIpList) { + @JsonDeserialize(as = LinkedHashSet.class) + public void setClientIpList(Set clientIpList) { this.clientIpList = clientIpList; } - public OpenGrayReleaseRuleItemDTO clientLabelList(List clientLabelList) { + public OpenGrayReleaseRuleItemDTO clientLabelList(Set clientLabelList) { this.clientLabelList = clientLabelList; return this; } public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListItem) { if (this.clientLabelList == null) { - this.clientLabelList = new ArrayList<>(); + this.clientLabelList = new LinkedHashSet<>(); } this.clientLabelList.add(clientLabelListItem); return this; @@ -100,11 +102,12 @@ public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListI @Schema(name = "clientLabelList", description = "客户端标签列表,通过标签来识别可以获取灰度配置的客户端", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("clientLabelList") - public List getClientLabelList() { + public Set getClientLabelList() { return clientLabelList; } - public void setClientLabelList(List clientLabelList) { + @JsonDeserialize(as = LinkedHashSet.class) + public void setClientLabelList(Set clientLabelList) { this.clientLabelList = clientLabelList; } 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 ec15b57..3a65ab4 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 @@ -2,6 +2,7 @@ import java.net.URI; import java.util.Objects; +import com.apollo.openapi.server.model.OpenItemExtendDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import org.openapitools.jackson.nullable.JsonNullable; @@ -15,13 +16,23 @@ import javax.annotation.Generated; /** - * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + * Apollo配置项核心数据对象,仅包含键值及基础审计信息 */ -@Schema(name = "OpenItemDTO", description = "Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据") +@Schema(name = "OpenItemDTO", description = "Apollo配置项核心数据对象,仅包含键值及基础审计信息") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OpenItemDTO { + private String key; + + private String value; + + private Integer type; + + private String comment; + + private OpenItemExtendDTO extendInfo; + private String dataChangeCreatedBy; private String dataChangeLastModifiedBy; @@ -30,13 +41,105 @@ public class OpenItemDTO { private String dataChangeLastModifiedTime; - private String key; + public OpenItemDTO key(String key) { + this.key = key; + return this; + } - private Integer type; + /** + * 配置项的键名,在同一命名空间内唯一标识一个配置项 + * @return key + */ - private String value; + @Schema(name = "key", description = "配置项的键名,在同一命名空间内唯一标识一个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("key") + public String getKey() { + return key; + } - private String comment; + public void setKey(String key) { + this.key = key; + } + + public OpenItemDTO value(String value) { + this.value = value; + return this; + } + + /** + * 配置项的值,可以是字符串、数字、JSON等格式 + * @return value + */ + + @Schema(name = "value", description = "配置项的值,可以是字符串、数字、JSON等格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("value") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public OpenItemDTO type(Integer type) { + this.type = type; + return this; + } + + /** + * 配置项类型 + * @return type + */ + + @Schema(name = "type", description = "配置项类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("type") + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public OpenItemDTO comment(String comment) { + this.comment = comment; + return this; + } + + /** + * 配置项的注释说明,用于描述配置项的用途和含义 + * @return comment + */ + + @Schema(name = "comment", description = "配置项的注释说明,用于描述配置项的用途和含义", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("comment") + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + public OpenItemDTO extendInfo(OpenItemExtendDTO extendInfo) { + this.extendInfo = extendInfo; + return this; + } + + /** + * Get extendInfo + * @return extendInfo + */ + @Valid + @Schema(name = "extendInfo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("extendInfo") + public OpenItemExtendDTO getExtendInfo() { + return extendInfo; + } + + public void setExtendInfo(OpenItemExtendDTO extendInfo) { + this.extendInfo = extendInfo; + } public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; @@ -118,86 +221,6 @@ public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; } - public OpenItemDTO key(String key) { - this.key = key; - return this; - } - - /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @return key - */ - - @Schema(name = "key", description = "配置项的键名,在同一命名空间内唯一标识一个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public OpenItemDTO type(Integer type) { - this.type = type; - return this; - } - - /** - * 配置项类型,0表示普通配置项,1表示文件类型配置项 - * @return type - */ - - @Schema(name = "type", description = "配置项类型,0表示普通配置项,1表示文件类型配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("type") - public Integer getType() { - return type; - } - - public void setType(Integer type) { - this.type = type; - } - - public OpenItemDTO value(String value) { - this.value = value; - return this; - } - - /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @return value - */ - - @Schema(name = "value", description = "配置项的值,可以是字符串、数字、JSON等格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("value") - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public OpenItemDTO comment(String comment) { - this.comment = comment; - return this; - } - - /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @return comment - */ - - @Schema(name = "comment", description = "配置项的注释说明,用于描述配置项的用途和含义", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - @Override public boolean equals(Object o) { if (this == o) { @@ -207,33 +230,35 @@ public boolean equals(Object o) { return false; } OpenItemDTO openItemDTO = (OpenItemDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openItemDTO.dataChangeCreatedBy) && + return Objects.equals(this.key, openItemDTO.key) && + Objects.equals(this.value, openItemDTO.value) && + Objects.equals(this.type, openItemDTO.type) && + Objects.equals(this.comment, openItemDTO.comment) && + Objects.equals(this.extendInfo, openItemDTO.extendInfo) && + 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); + Objects.equals(this.dataChangeLastModifiedTime, openItemDTO.dataChangeLastModifiedTime); } @Override public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, key, type, value, comment); + return Objects.hash(key, value, type, comment, extendInfo, dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenItemDTO {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" extendInfo: ").append(toIndentedString(extendInfo)).append("\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(); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java new file mode 100644 index 0000000..35f626f --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java @@ -0,0 +1,233 @@ +package com.apollo.openapi.server.model; + +import java.net.URI; +import java.util.Objects; +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; +import java.util.List; +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; + +/** + * OpenItemDiffDTO + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenItemDiffDTO { + + private Integer code; + + private String message; + + private OpenNamespaceIdentifier namespace; + + @Valid + private List<@Valid OpenItemDTO> createItems; + + @Valid + private List<@Valid OpenItemDTO> deleteItems; + + @Valid + private List<@Valid OpenItemDTO> updateItems; + + public OpenItemDiffDTO code(Integer code) { + this.code = code; + return this; + } + + /** + * 查找结果 + * @return code + */ + + @Schema(name = "code", description = "查找结果", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("code") + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public OpenItemDiffDTO message(String message) { + this.message = message; + return this; + } + + /** + * 查找结果信息 + * @return message + */ + + @Schema(name = "message", description = "查找结果信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public OpenItemDiffDTO namespace(OpenNamespaceIdentifier namespace) { + this.namespace = namespace; + return this; + } + + /** + * Get namespace + * @return namespace + */ + @Valid + @Schema(name = "namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("namespace") + public OpenNamespaceIdentifier getNamespace() { + return namespace; + } + + public void setNamespace(OpenNamespaceIdentifier namespace) { + this.namespace = namespace; + } + + public OpenItemDiffDTO createItems(List<@Valid OpenItemDTO> createItems) { + this.createItems = createItems; + return this; + } + + public OpenItemDiffDTO addCreateItemsItem(OpenItemDTO createItemsItem) { + if (this.createItems == null) { + this.createItems = new ArrayList<>(); + } + this.createItems.add(createItemsItem); + return this; + } + + /** + * Get createItems + * @return createItems + */ + @Valid + @Schema(name = "createItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("createItems") + public List<@Valid OpenItemDTO> getCreateItems() { + return createItems; + } + + public void setCreateItems(List<@Valid OpenItemDTO> createItems) { + this.createItems = createItems; + } + + public OpenItemDiffDTO deleteItems(List<@Valid OpenItemDTO> deleteItems) { + this.deleteItems = deleteItems; + return this; + } + + public OpenItemDiffDTO addDeleteItemsItem(OpenItemDTO deleteItemsItem) { + if (this.deleteItems == null) { + this.deleteItems = new ArrayList<>(); + } + this.deleteItems.add(deleteItemsItem); + return this; + } + + /** + * Get deleteItems + * @return deleteItems + */ + @Valid + @Schema(name = "deleteItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("deleteItems") + public List<@Valid OpenItemDTO> getDeleteItems() { + return deleteItems; + } + + public void setDeleteItems(List<@Valid OpenItemDTO> deleteItems) { + this.deleteItems = deleteItems; + } + + public OpenItemDiffDTO updateItems(List<@Valid OpenItemDTO> updateItems) { + this.updateItems = updateItems; + return this; + } + + public OpenItemDiffDTO addUpdateItemsItem(OpenItemDTO updateItemsItem) { + if (this.updateItems == null) { + this.updateItems = new ArrayList<>(); + } + this.updateItems.add(updateItemsItem); + return this; + } + + /** + * Get updateItems + * @return updateItems + */ + @Valid + @Schema(name = "updateItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("updateItems") + public List<@Valid OpenItemDTO> getUpdateItems() { + return updateItems; + } + + public void setUpdateItems(List<@Valid OpenItemDTO> updateItems) { + this.updateItems = updateItems; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenItemDiffDTO openItemDiffDTO = (OpenItemDiffDTO) o; + return Objects.equals(this.code, openItemDiffDTO.code) && + Objects.equals(this.message, openItemDiffDTO.message) && + Objects.equals(this.namespace, openItemDiffDTO.namespace) && + Objects.equals(this.createItems, openItemDiffDTO.createItems) && + Objects.equals(this.deleteItems, openItemDiffDTO.deleteItems) && + Objects.equals(this.updateItems, openItemDiffDTO.updateItems); + } + + @Override + public int hashCode() { + return Objects.hash(code, message, namespace, createItems, deleteItems, updateItems); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenItemDiffDTO {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); + sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); + sb.append(" updateItems: ").append(toIndentedString(updateItems)).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/OpenItemDiffs.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java deleted file mode 100644 index af9d3ae..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffs.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -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.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; - -/** - * OpenItemDiffs - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenItemDiffs { - - private OpenNamespaceIdentifier namespace; - - private OpenItemChangeSets diffs; - - private String extInfo; - - public OpenItemDiffs namespace(OpenNamespaceIdentifier namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get namespace - * @return namespace - */ - @Valid - @Schema(name = "namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespace") - public OpenNamespaceIdentifier getNamespace() { - return namespace; - } - - public void setNamespace(OpenNamespaceIdentifier namespace) { - this.namespace = namespace; - } - - public OpenItemDiffs diffs(OpenItemChangeSets diffs) { - this.diffs = diffs; - return this; - } - - /** - * Get diffs - * @return diffs - */ - @Valid - @Schema(name = "diffs", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("diffs") - public OpenItemChangeSets getDiffs() { - return diffs; - } - - public void setDiffs(OpenItemChangeSets diffs) { - this.diffs = diffs; - } - - public OpenItemDiffs extInfo(String extInfo) { - this.extInfo = extInfo; - return this; - } - - /** - * 扩展信息 - * @return extInfo - */ - - @Schema(name = "extInfo", description = "扩展信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("extInfo") - public String getExtInfo() { - return extInfo; - } - - public void setExtInfo(String extInfo) { - this.extInfo = extInfo; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemDiffs openItemDiffs = (OpenItemDiffs) o; - return Objects.equals(this.namespace, openItemDiffs.namespace) && - Objects.equals(this.diffs, openItemDiffs.diffs) && - Objects.equals(this.extInfo, openItemDiffs.extInfo); - } - - @Override - public int hashCode() { - return Objects.hash(namespace, diffs, extInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - 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"); - 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/OpenItemExtendDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java new file mode 100644 index 0000000..b52277f --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java @@ -0,0 +1,203 @@ +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.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; + +/** + * Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + */ + +@Schema(name = "OpenItemExtendDTO", description = "Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenItemExtendDTO { + + private Long namespaceId; + + private Boolean isModified; + + private Boolean isDeleted; + + private Boolean isNewlyAdded; + + private String newValue; + + private String oldValue; + + public OpenItemExtendDTO namespaceId(Long namespaceId) { + this.namespaceId = namespaceId; + return this; + } + + /** + * 所属命名空间的ID + * @return namespaceId + */ + + @Schema(name = "namespaceId", description = "所属命名空间的ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("namespaceId") + public Long getNamespaceId() { + return namespaceId; + } + + public void setNamespaceId(Long namespaceId) { + this.namespaceId = namespaceId; + } + + public OpenItemExtendDTO isModified(Boolean isModified) { + this.isModified = isModified; + return this; + } + + /** + * 是否有未发布的修改 + * @return isModified + */ + + @Schema(name = "isModified", description = "是否有未发布的修改", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isModified") + public Boolean getIsModified() { + return isModified; + } + + public void setIsModified(Boolean isModified) { + this.isModified = isModified; + } + + public OpenItemExtendDTO isDeleted(Boolean isDeleted) { + this.isDeleted = isDeleted; + return this; + } + + /** + * 是否被标记为删除(未发布) + * @return isDeleted + */ + + @Schema(name = "isDeleted", description = "是否被标记为删除(未发布)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isDeleted") + public Boolean getIsDeleted() { + return isDeleted; + } + + public void setIsDeleted(Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + public OpenItemExtendDTO isNewlyAdded(Boolean isNewlyAdded) { + this.isNewlyAdded = isNewlyAdded; + return this; + } + + /** + * 是否为新添加的配置项(未发布) + * @return isNewlyAdded + */ + + @Schema(name = "isNewlyAdded", description = "是否为新添加的配置项(未发布)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isNewlyAdded") + public Boolean getIsNewlyAdded() { + return isNewlyAdded; + } + + public void setIsNewlyAdded(Boolean isNewlyAdded) { + this.isNewlyAdded = isNewlyAdded; + } + + public OpenItemExtendDTO newValue(String newValue) { + this.newValue = newValue; + return this; + } + + /** + * 新的值 + * @return newValue + */ + + @Schema(name = "newValue", description = "新的值", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("newValue") + public String getNewValue() { + return newValue; + } + + public void setNewValue(String newValue) { + this.newValue = newValue; + } + + public OpenItemExtendDTO oldValue(String oldValue) { + this.oldValue = oldValue; + return this; + } + + /** + * 上一次发布的值,用于对比变更 + * @return oldValue + */ + + @Schema(name = "oldValue", description = "上一次发布的值,用于对比变更", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("oldValue") + public String getOldValue() { + return oldValue; + } + + public void setOldValue(String oldValue) { + this.oldValue = oldValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenItemExtendDTO openItemExtendDTO = (OpenItemExtendDTO) o; + return Objects.equals(this.namespaceId, openItemExtendDTO.namespaceId) && + Objects.equals(this.isModified, openItemExtendDTO.isModified) && + Objects.equals(this.isDeleted, openItemExtendDTO.isDeleted) && + Objects.equals(this.isNewlyAdded, openItemExtendDTO.isNewlyAdded) && + Objects.equals(this.newValue, openItemExtendDTO.newValue) && + Objects.equals(this.oldValue, openItemExtendDTO.oldValue); + } + + @Override + public int hashCode() { + return Objects.hash(namespaceId, isModified, isDeleted, isNewlyAdded, newValue, oldValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenItemExtendDTO {\n"); + sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); + sb.append(" isModified: ").append(toIndentedString(isModified)).append("\n"); + sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); + sb.append(" isNewlyAdded: ").append(toIndentedString(isNewlyAdded)).append("\n"); + sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); + sb.append(" oldValue: ").append(toIndentedString(oldValue)).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/OpenNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java index dda339b..ca9f229 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 @@ -3,6 +3,7 @@ import java.net.URI; import java.util.Objects; import com.apollo.openapi.server.model.OpenItemDTO; +import com.apollo.openapi.server.model.OpenNamespaceExtendDTO; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import java.util.ArrayList; @@ -48,6 +49,8 @@ public class OpenNamespaceDTO { @Valid private List<@Valid OpenItemDTO> items; + private OpenNamespaceExtendDTO extendInfo; + public OpenNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; @@ -276,6 +279,26 @@ public void setItems(List<@Valid OpenItemDTO> items) { this.items = items; } + public OpenNamespaceDTO extendInfo(OpenNamespaceExtendDTO extendInfo) { + this.extendInfo = extendInfo; + return this; + } + + /** + * Get extendInfo + * @return extendInfo + */ + @Valid + @Schema(name = "extendInfo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("extendInfo") + public OpenNamespaceExtendDTO getExtendInfo() { + return extendInfo; + } + + public void setExtendInfo(OpenNamespaceExtendDTO extendInfo) { + this.extendInfo = extendInfo; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -295,12 +318,13 @@ public boolean equals(Object o) { Objects.equals(this.comment, openNamespaceDTO.comment) && Objects.equals(this.format, openNamespaceDTO.format) && Objects.equals(this.isPublic, openNamespaceDTO.isPublic) && - Objects.equals(this.items, openNamespaceDTO.items); + Objects.equals(this.items, openNamespaceDTO.items) && + Objects.equals(this.extendInfo, openNamespaceDTO.extendInfo); } @Override public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items); + return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items, extendInfo); } @Override @@ -318,6 +342,7 @@ public String toString() { 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(" extendInfo: ").append(toIndentedString(extendInfo)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java new file mode 100644 index 0000000..05ce77e --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java @@ -0,0 +1,130 @@ +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.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; + +/** + * OpenNamespaceExtendDTO + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenNamespaceExtendDTO { + + private Boolean isConfigHidden; + + private String parentAppId; + + private Integer itemModifiedCnt; + + public OpenNamespaceExtendDTO isConfigHidden(Boolean isConfigHidden) { + this.isConfigHidden = isConfigHidden; + return this; + } + + /** + * 当当前用户无权限查看配置时置为 true + * @return isConfigHidden + */ + + @Schema(name = "isConfigHidden", description = "当当前用户无权限查看配置时置为 true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isConfigHidden") + public Boolean getIsConfigHidden() { + return isConfigHidden; + } + + public void setIsConfigHidden(Boolean isConfigHidden) { + this.isConfigHidden = isConfigHidden; + } + + public OpenNamespaceExtendDTO parentAppId(String parentAppId) { + this.parentAppId = parentAppId; + return this; + } + + /** + * 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + * @return parentAppId + */ + + @Schema(name = "parentAppId", description = "公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("parentAppId") + public String getParentAppId() { + return parentAppId; + } + + public void setParentAppId(String parentAppId) { + this.parentAppId = parentAppId; + } + + public OpenNamespaceExtendDTO itemModifiedCnt(Integer itemModifiedCnt) { + this.itemModifiedCnt = itemModifiedCnt; + return this; + } + + /** + * 未发布变更数 + * @return itemModifiedCnt + */ + + @Schema(name = "itemModifiedCnt", description = "未发布变更数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemModifiedCnt") + public Integer getItemModifiedCnt() { + return itemModifiedCnt; + } + + public void setItemModifiedCnt(Integer itemModifiedCnt) { + this.itemModifiedCnt = itemModifiedCnt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenNamespaceExtendDTO openNamespaceExtendDTO = (OpenNamespaceExtendDTO) o; + return Objects.equals(this.isConfigHidden, openNamespaceExtendDTO.isConfigHidden) && + Objects.equals(this.parentAppId, openNamespaceExtendDTO.parentAppId) && + Objects.equals(this.itemModifiedCnt, openNamespaceExtendDTO.itemModifiedCnt); + } + + @Override + public int hashCode() { + return Objects.hash(isConfigHidden, parentAppId, itemModifiedCnt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenNamespaceExtendDTO {\n"); + sb.append(" isConfigHidden: ").append(toIndentedString(isConfigHidden)).append("\n"); + sb.append(" parentAppId: ").append(toIndentedString(parentAppId)).append("\n"); + sb.append(" itemModifiedCnt: ").append(toIndentedString(itemModifiedCnt)).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/OpenNamespaceLockDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java index 18691e4..ab45e50 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 @@ -28,6 +28,8 @@ public class OpenNamespaceLockDTO { private String lockedBy; + private Boolean isEmergencyPublishAllowed; + public OpenNamespaceLockDTO namespaceName(String namespaceName) { this.namespaceName = namespaceName; return this; @@ -88,6 +90,26 @@ public void setLockedBy(String lockedBy) { this.lockedBy = lockedBy; } + public OpenNamespaceLockDTO isEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { + this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; + return this; + } + + /** + * 是否允许紧急发布 + * @return isEmergencyPublishAllowed + */ + + @Schema(name = "isEmergencyPublishAllowed", description = "是否允许紧急发布", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isEmergencyPublishAllowed") + public Boolean getIsEmergencyPublishAllowed() { + return isEmergencyPublishAllowed; + } + + public void setIsEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { + this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -99,12 +121,13 @@ public boolean equals(Object o) { OpenNamespaceLockDTO openNamespaceLockDTO = (OpenNamespaceLockDTO) o; return Objects.equals(this.namespaceName, openNamespaceLockDTO.namespaceName) && Objects.equals(this.isLocked, openNamespaceLockDTO.isLocked) && - Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy); + Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy) && + Objects.equals(this.isEmergencyPublishAllowed, openNamespaceLockDTO.isEmergencyPublishAllowed); } @Override public int hashCode() { - return Objects.hash(namespaceName, isLocked, lockedBy); + return Objects.hash(namespaceName, isLocked, lockedBy, isEmergencyPublishAllowed); } @Override @@ -114,6 +137,7 @@ public String toString() { 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(" isEmergencyPublishAllowed: ").append(toIndentedString(isEmergencyPublishAllowed)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java similarity index 79% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java index f79a52d..e5d9934 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java @@ -19,11 +19,11 @@ import javax.annotation.Generated; /** - * OpenNamespaceSyncModel + * OpenNamespaceSyncDTO */ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceSyncModel { +public class OpenNamespaceSyncDTO { @Valid private List<@Valid OpenNamespaceIdentifier> syncToNamespaces; @@ -31,12 +31,12 @@ public class OpenNamespaceSyncModel { @Valid private List<@Valid OpenItemDTO> syncItems; - public OpenNamespaceSyncModel syncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { + public OpenNamespaceSyncDTO syncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { this.syncToNamespaces = syncToNamespaces; return this; } - public OpenNamespaceSyncModel addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { + public OpenNamespaceSyncDTO addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { if (this.syncToNamespaces == null) { this.syncToNamespaces = new ArrayList<>(); } @@ -59,12 +59,12 @@ public void setSyncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNames this.syncToNamespaces = syncToNamespaces; } - public OpenNamespaceSyncModel syncItems(List<@Valid OpenItemDTO> syncItems) { + public OpenNamespaceSyncDTO syncItems(List<@Valid OpenItemDTO> syncItems) { this.syncItems = syncItems; return this; } - public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { + public OpenNamespaceSyncDTO addSyncItemsItem(OpenItemDTO syncItemsItem) { if (this.syncItems == null) { this.syncItems = new ArrayList<>(); } @@ -73,11 +73,11 @@ public OpenNamespaceSyncModel addSyncItemsItem(OpenItemDTO syncItemsItem) { } /** - * 需要同步的配置项列表 + * 需要修改的配置项列表 * @return syncItems */ @Valid - @Schema(name = "syncItems", description = "需要同步的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @Schema(name = "syncItems", description = "需要修改的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("syncItems") public List<@Valid OpenItemDTO> getSyncItems() { return syncItems; @@ -95,9 +95,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenNamespaceSyncModel openNamespaceSyncModel = (OpenNamespaceSyncModel) o; - return Objects.equals(this.syncToNamespaces, openNamespaceSyncModel.syncToNamespaces) && - Objects.equals(this.syncItems, openNamespaceSyncModel.syncItems); + OpenNamespaceSyncDTO openNamespaceSyncDTO = (OpenNamespaceSyncDTO) o; + return Objects.equals(this.syncToNamespaces, openNamespaceSyncDTO.syncToNamespaces) && + Objects.equals(this.syncItems, openNamespaceSyncDTO.syncItems); } @Override @@ -108,7 +108,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceSyncModel {\n"); + sb.append("class OpenNamespaceSyncDTO {\n"); sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); sb.append("}"); diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java new file mode 100644 index 0000000..03f5489 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java @@ -0,0 +1,227 @@ +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.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 = "OpenNamespaceUsageDTO", description = "命名空间使用情况数据传输对象,统计各环境和集群下的使用指标") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenNamespaceUsageDTO { + + private String namespaceName; + + private String appId; + + private String clusterName; + + private String envName; + + private Integer instanceCount; + + private Integer branchInstanceCount; + + private Integer linkedNamespaceCount; + + public OpenNamespaceUsageDTO namespaceName(String namespaceName) { + this.namespaceName = namespaceName; + return this; + } + + /** + * 命名空间名称 + * @return namespaceName + */ + + @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("namespaceName") + public String getNamespaceName() { + return namespaceName; + } + + public void setNamespaceName(String namespaceName) { + this.namespaceName = namespaceName; + } + + public OpenNamespaceUsageDTO appId(String appId) { + this.appId = appId; + return this; + } + + /** + * 所属应用的唯一标识符 + * @return appId + */ + + @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("appId") + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + + public OpenNamespaceUsageDTO clusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * 所属集群名称 + * @return clusterName + */ + + @Schema(name = "clusterName", description = "所属集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("clusterName") + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public OpenNamespaceUsageDTO envName(String envName) { + this.envName = envName; + return this; + } + + /** + * 环境名称 + * @return envName + */ + + @Schema(name = "envName", description = "环境名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("envName") + public String getEnvName() { + return envName; + } + + public void setEnvName(String envName) { + this.envName = envName; + } + + public OpenNamespaceUsageDTO instanceCount(Integer instanceCount) { + this.instanceCount = instanceCount; + return this; + } + + /** + * 该命名空间关联的实例数量 + * @return instanceCount + */ + + @Schema(name = "instanceCount", description = "该命名空间关联的实例数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("instanceCount") + public Integer getInstanceCount() { + return instanceCount; + } + + public void setInstanceCount(Integer instanceCount) { + this.instanceCount = instanceCount; + } + + public OpenNamespaceUsageDTO branchInstanceCount(Integer branchInstanceCount) { + this.branchInstanceCount = branchInstanceCount; + return this; + } + + /** + * 分支命名空间关联的实例数量 + * @return branchInstanceCount + */ + + @Schema(name = "branchInstanceCount", description = "分支命名空间关联的实例数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("branchInstanceCount") + public Integer getBranchInstanceCount() { + return branchInstanceCount; + } + + public void setBranchInstanceCount(Integer branchInstanceCount) { + this.branchInstanceCount = branchInstanceCount; + } + + public OpenNamespaceUsageDTO linkedNamespaceCount(Integer linkedNamespaceCount) { + this.linkedNamespaceCount = linkedNamespaceCount; + return this; + } + + /** + * 关联到该公共命名空间的命名空间数量 + * @return linkedNamespaceCount + */ + + @Schema(name = "linkedNamespaceCount", description = "关联到该公共命名空间的命名空间数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("linkedNamespaceCount") + public Integer getLinkedNamespaceCount() { + return linkedNamespaceCount; + } + + public void setLinkedNamespaceCount(Integer linkedNamespaceCount) { + this.linkedNamespaceCount = linkedNamespaceCount; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenNamespaceUsageDTO openNamespaceUsageDTO = (OpenNamespaceUsageDTO) o; + return Objects.equals(this.namespaceName, openNamespaceUsageDTO.namespaceName) && + Objects.equals(this.appId, openNamespaceUsageDTO.appId) && + Objects.equals(this.clusterName, openNamespaceUsageDTO.clusterName) && + Objects.equals(this.envName, openNamespaceUsageDTO.envName) && + Objects.equals(this.instanceCount, openNamespaceUsageDTO.instanceCount) && + Objects.equals(this.branchInstanceCount, openNamespaceUsageDTO.branchInstanceCount) && + Objects.equals(this.linkedNamespaceCount, openNamespaceUsageDTO.linkedNamespaceCount); + } + + @Override + public int hashCode() { + return Objects.hash(namespaceName, appId, clusterName, envName, instanceCount, branchInstanceCount, linkedNamespaceCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenNamespaceUsageDTO {\n"); + sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); + sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); + sb.append(" instanceCount: ").append(toIndentedString(instanceCount)).append("\n"); + sb.append(" branchInstanceCount: ").append(toIndentedString(branchInstanceCount)).append("\n"); + sb.append(" linkedNamespaceCount: ").append(toIndentedString(linkedNamespaceCount)).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/RichResponseEntity.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java deleted file mode 100644 index c8e733a..0000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/RichResponseEntity.java +++ /dev/null @@ -1,148 +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.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; - -/** - * A wrapper for a single response entity with code, message, and body - */ - -@Schema(name = "RichResponseEntity", description = "A wrapper for a single response entity with code, message, and body") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class RichResponseEntity { - - private Integer code; - - private Object message; - - private Object body; - - /** - * Default constructor - * @deprecated Use {@link RichResponseEntity#RichResponseEntity(Integer, Object)} - */ - @Deprecated - public RichResponseEntity() { - super(); - } - - /** - * Constructor with only required parameters - */ - public RichResponseEntity(Integer code, Object message) { - this.code = code; - this.message = message; - } - - public RichResponseEntity code(Integer code) { - this.code = code; - return this; - } - - /** - * HTTP status code - * @return code - */ - @NotNull - @Schema(name = "code", example = "200", description = "HTTP status code", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("code") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public RichResponseEntity message(Object message) { - this.message = message; - return this; - } - - /** - * Response message (can be string or object) - * @return message - */ - @NotNull - @Schema(name = "message", example = "OK", description = "Response message (can be string or object)", requiredMode = Schema.RequiredMode.REQUIRED) - @JsonProperty("message") - public Object getMessage() { - return message; - } - - public void setMessage(Object message) { - this.message = message; - } - - public RichResponseEntity body(Object body) { - this.body = body; - return this; - } - - /** - * Response payload (generic type T) - * @return body - */ - - @Schema(name = "body", description = "Response payload (generic type T)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("body") - public Object getBody() { - return body; - } - - public void setBody(Object body) { - this.body = body; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RichResponseEntity richResponseEntity = (RichResponseEntity) o; - return Objects.equals(this.code, richResponseEntity.code) && - Objects.equals(this.message, richResponseEntity.message) && - Objects.equals(this.body, richResponseEntity.body); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, body); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RichResponseEntity {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" body: ").append(toIndentedString(body)).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 9e3bc0e..0f10ebf 100644 --- a/spring-boot2/src/main/resources/openapi.yaml +++ b/spring-boot2/src/main/resources/openapi.yaml @@ -33,8 +33,12 @@ tags: name: Cluster Management - description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 name: Namespace Management +- description: AppNamespace管理相关接口,包括创建、查询、删除等操作 + name: AppNamespace Management +- description: 命名空间锁管理相关接口 + name: Namespace Lock Management - description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 - name: Namespace Namespace Branch Management + name: Namespace Branch Management - description: 实例管理相关接口,包括实例查询、配置生效状态等功能 name: Instance Management - description: 组织管理相关接口,包括组织信息查询等功能 @@ -185,7 +189,7 @@ paths: /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envClusters" + description: "GET /openapi/v1/apps/{appId}/envclusters" operationId: getEnvClusters parameters: - description: 应用ID @@ -628,16 +632,12 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项删除成功 summary: 删除配置项 (original openapi) tags: @@ -773,6 +773,14 @@ paths: default: false type: boolean style: form + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -781,10 +789,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功 "400": content: @@ -958,7 +962,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -1003,6 +1007,73 @@ paths: x-accepts: application/json x-tags: - tag: Item Management + put: + deprecated: false + description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:" + operationId: batchUpdateItemsByText + 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: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenNamespaceTextModel' + required: true + responses: + "200": + description: 批量更新配置项成功 + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/ExceptionResponse' + description: 权限不足 + summary: 通过文本批量修改配置项 (new added) + tags: + - Item Management + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: Item Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: delete: deprecated: false @@ -1059,10 +1130,6 @@ paths: style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: "" summary: 通过编码的key删除配置项 (original openapi) tags: @@ -1198,6 +1265,14 @@ paths: default: false type: boolean style: form + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -1206,10 +1281,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功(编码key) "400": content: @@ -1236,83 +1307,11 @@ paths: x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate:" - operationId: batchUpdateItemsByText - 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 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' - description: 批量更新配置项成功 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 通过文本批量修改配置项 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:" - operationId: getBranchItems + operationId: findBranchItems parameters: - description: 应用ID explode: false @@ -1392,10 +1391,10 @@ paths: x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff: post: deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare" + description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" operationId: compareItems parameters: - description: 应用ID @@ -1434,7 +1433,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceSyncModel' + $ref: '#/components/schemas/OpenNamespaceSyncDTO' required: true responses: "200": @@ -1498,7 +1497,7 @@ paths: extInfo: "" schema: items: - $ref: '#/components/schemas/OpenItemDiffs' + $ref: '#/components/schemas/OpenItemDiffDTO' type: array description: 成功对比命名空间配置差异 summary: 对比命名空间配置差异 (new added) @@ -1508,10 +1507,10 @@ paths: x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync:" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:" operationId: syncItems parameters: - description: 应用ID @@ -1550,7 +1549,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -1558,14 +1557,10 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenNamespaceSyncModel' + $ref: '#/components/schemas/OpenNamespaceSyncDTO' required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项同步成功 "400": content: @@ -1586,11 +1581,11 @@ paths: x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate" - operationId: validateItems + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" + operationId: syntaxCheck parameters: - description: "" explode: false @@ -1632,10 +1627,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置文本语法验证通过 "400": content: @@ -1650,10 +1641,10 @@ paths: x-accepts: application/json x-tags: - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert: + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation: post: deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert" + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" operationId: revertItems parameters: - description: "" @@ -1692,16 +1683,12 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更改撤销成功 "400": content: @@ -2161,11 +2148,11 @@ paths: description: 权限不足 summary: 合并分支 (original openapi) tags: - - Release Management + - Namespace Branch Management x-content-type: application/json x-accepts: application/json x-tags: - - tag: Release Management + - tag: Namespace Branch Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: post: deprecated: false @@ -2353,7 +2340,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -2917,11 +2904,80 @@ paths: x-accepts: application/json x-tags: - tag: Instance Management + /openapi/v1/namespaces: + post: + deprecated: false + description: "POST /openapi/v1/apps/{appId}/namespaces" + operationId: createNamespaces + parameters: + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/OpenCreateNamespaceDTO' + type: array + required: true + responses: + "200": + description: Namespace创建成功 + summary: 创建Namespace (new added) + tags: + - Namespace Management + x-content-type: application/json + x-accepts: application/json + x-tags: + - tag: Namespace Management + /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage: + get: + deprecated: false + description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" + operationId: findAppNamespaceUsage + parameters: + - description: 应用ID + 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: + items: + $ref: '#/components/schemas/OpenNamespaceUsageDTO' + type: array + description: AppNamespaceUsage查询成功 + summary: 查询appnamespace使用情况(new added) + tags: + - AppNamespace Management + x-accepts: application/json + x-tags: + - tag: AppNamespace Management /openapi/v1/apps/{appId}/appnamespaces: get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces" - operationId: getAppNamespacesByApp + operationId: getAppNamespacesByAppId parameters: - description: "" explode: false @@ -2953,14 +3009,14 @@ paths: description: "" summary: 获取指定应用的AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json x-tags: - - tag: Namespace Management + - tag: AppNamespace Management post: deprecated: false description: "POST /openapi/v1/apps/{appId}/appnamespaces" - operationId: createNamespace + operationId: createAppNamespace parameters: - description: "" explode: false @@ -2970,13 +3026,21 @@ paths: schema: type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - required: true - responses: + - description: 操作人用户名 + explode: true + in: query + name: operator + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OpenAppNamespaceDTO' + required: true + responses: "200": content: application/json: @@ -3008,11 +3072,11 @@ paths: description: 权限不足 summary: 创建AppNamespace (original openapi) tags: - - Namespace Management + - AppNamespace Management x-content-type: application/json x-accepts: application/json x-tags: - - tag: Namespace Management + - tag: AppNamespace Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: get: deprecated: false @@ -3053,6 +3117,15 @@ paths: default: true type: boolean style: form + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3092,7 +3165,7 @@ paths: get: deprecated: false description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - operationId: loadNamespace + operationId: findNamespace parameters: - description: "" explode: false @@ -3136,6 +3209,15 @@ paths: default: true type: boolean style: form + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3169,6 +3251,85 @@ paths: x-accepts: application/json x-tags: - tag: Namespace Management + /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: + get: + deprecated: false + description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" + operationId: findPublicNamespaceForAssociatedNamespace + parameters: + - description: 环境标识 + explode: false + in: path + name: env + required: true + schema: + type: string + style: simple + - description: 应用ID + 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: 关联Namespace名称 + explode: false + in: path + name: namespaceName + required: true + schema: + type: string + style: simple + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form + responses: + "200": + content: + application/json: + example: + dataChangeCreatedBy: apollo + dataChangeLastModifiedBy: apollo + dataChangeCreatedTime: 2024-01-15T10:30:00.000Z + dataChangeLastModifiedTime: 2024-01-20T11:00:00.000Z + appId: public-owner-app + clusterName: default + namespaceName: public.namespace + comment: 公共 namespace 示例 + format: properties + isPublic: true + parentAppId: public-owner-app + isConfigHidden: false + itemModifiedCnt: 0 + items: + - key: k1 + value: v1 + - key: k2 + value: v2 + schema: + $ref: '#/components/schemas/OpenNamespaceDTO' + description: 成功获取关联的公共Namespace详情 + summary: 查询关联Namespace对应的公共Namespace详情 (new added) + tags: + - Namespace Management + x-accepts: application/json + x-tags: + - tag: Namespace Management /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: get: deprecated: false @@ -3220,25 +3381,15 @@ paths: description: "" summary: 获取Namespace的锁状态 (original openapi) tags: - - Namespace Management + - Namespace Lock Management x-accepts: application/json x-tags: - - tag: Namespace Management + - tag: Namespace Lock Management /openapi/v1/appnamespaces: get: deprecated: false - description: GET /openapi/v1/appnamespaces?public=true + description: GET /openapi/v1/appnamespaces/public operationId: getAppNamespaces - parameters: - - description: "" - example: "false" - explode: true - in: query - name: publicOnly - required: true - schema: - type: boolean - style: form responses: "200": content: @@ -3261,10 +3412,10 @@ paths: description: "" summary: 获取所有公共AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json x-tags: - - tag: Namespace Management + - tag: AppNamespace Management /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: delete: deprecated: false @@ -3291,27 +3442,23 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: AppNamespace删除成功 summary: 删除AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json x-tags: - - tag: Namespace Management + - tag: AppNamespace Management get: deprecated: false description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - operationId: getAppNamespace + operationId: findAppNamespace parameters: - description: 应用ID explode: false @@ -3329,6 +3476,15 @@ paths: schema: type: string style: simple + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3349,10 +3505,10 @@ paths: description: 成功获取AppNamespace summary: 获取指定的AppNamespace (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json x-tags: - - tag: Namespace Management + - tag: AppNamespace Management /openapi/v1/apps/{appId}/namespaces/releases/status: get: deprecated: false @@ -3451,15 +3607,15 @@ paths: description: 成功获取实例列表 summary: 获取公共AppNamespace的所有实例 (new added) tags: - - Namespace Management + - AppNamespace Management x-accepts: application/json x-tags: - - tag: Namespace Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association: + - tag: AppNamespace Management + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association" - operationId: getPublicNamespaceAssociation + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" + operationId: findNamespaceUsage parameters: - description: 应用ID explode: false @@ -3497,40 +3653,22 @@ paths: "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: 成功获取关联的公共Namespace - summary: 获取关联的公共Namespace (new added) + items: + $ref: '#/components/schemas/OpenNamespaceUsageDTO' + type: array + description: NamespaceUsage查询成功 + summary: 查询namespace使用情况(new added) tags: - Namespace Management x-accepts: application/json x-tags: - tag: Namespace Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check: + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check" - operationId: checkNamespaceIntegrity + description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" + operationId: findMissingNamespaces parameters: - description: 应用ID explode: false @@ -3567,17 +3705,67 @@ paths: type: string type: array description: 缺失的命名空间名称列表 - summary: 检查缺失的Namespace (new added) + summary: 查找缺失的Namespace (new added) tags: - Namespace Management x-accepts: application/json x-tags: - tag: Namespace Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links: + post: + deprecated: false + description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" + operationId: createMissingNamespaces + parameters: + - description: 应用ID + 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: true + in: query + name: operator + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessEmptyResponse' + description: 缺失的命名空间创建成功 + summary: 创建缺失的Namespace (new added) + tags: + - Namespace Management + x-accepts: application/json + x-tags: + - tag: Namespace Management + /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: delete: deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links" - operationId: deleteNamespaceLinks + description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" + operationId: deleteNamespace parameters: - description: 应用ID explode: false @@ -3615,18 +3803,14 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 解除关联成功 - summary: 删除关联的Namespace (new added) + summary: 删除指定的Namespace (new added) tags: - Namespace Management x-accepts: application/json @@ -3704,6 +3888,15 @@ paths: schema: type: string style: simple + - description: "" + explode: true + in: query + name: extendInfo + required: false + schema: + default: false + type: boolean + style: form responses: "200": content: @@ -3792,7 +3985,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -3885,10 +4078,6 @@ paths: style: form responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 分支删除成功 summary: 删除命名空间分支 (original openapi) tags: @@ -3896,12 +4085,9 @@ paths: x-accepts: application/json x-tags: - tag: Namespace Branch Management - patch: + post: deprecated: false - description: |- - PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - - 使用 PATCH 方法表示部分更新操作(将分支状态从"独立"更新为"合并") + description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" operationId: mergeBranch parameters: - description: 环境标识 @@ -3957,7 +4143,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -4130,10 +4316,6 @@ paths: required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SuccessEmptyResponse' description: 灰度规则更新成功 summary: 更新分支灰度发布规则 (original openapi) tags: @@ -4252,17 +4434,38 @@ components: $ref: '#/components/schemas/OpenAppDTO' type: object OpenItemDTO: - description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + description: Apollo配置项核心数据对象,仅包含键值及基础审计信息 example: dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: + key: + description: 配置项的键名,在同一命名空间内唯一标识一个配置项 + type: string + value: + description: 配置项的值,可以是字符串、数字、JSON等格式 + type: string + type: + description: 配置项类型 + type: integer + comment: + description: 配置项的注释说明,用于描述配置项的用途和含义 + type: string + extendInfo: + $ref: '#/components/schemas/OpenItemExtendDTO' dataChangeCreatedBy: description: 配置项创建者用户名,记录是谁创建了这个配置项 type: string @@ -4277,6 +4480,39 @@ components: description: 配置项最后修改时间,ISO 8601格式的时间戳 example: 2025-09-29T12:34:56Z type: string + type: object + OpenItemExtendDTO: + description: Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + example: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true + properties: + namespaceId: + description: 所属命名空间的ID + format: int64 + type: integer + isModified: + description: 是否有未发布的修改 + type: boolean + isDeleted: + description: 是否被标记为删除(未发布) + type: boolean + isNewlyAdded: + description: 是否为新添加的配置项(未发布) + type: boolean + newValue: + description: 新的值 + type: string + oldValue: + description: 上一次发布的值,用于对比变更 + type: string + type: object + OpenCreateItemDTO: + properties: key: description: 配置项的键名,在同一命名空间内唯一标识一个配置项 type: string @@ -4302,17 +4538,31 @@ components: dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: page: description: 当前页码,从0开始计数 @@ -4531,6 +4781,39 @@ components: description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 type: string type: object + OpenNamespaceUsageDTO: + description: 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + example: + branchInstanceCount: 6 + envName: envName + instanceCount: 0 + appId: appId + clusterName: clusterName + linkedNamespaceCount: 1 + namespaceName: namespaceName + properties: + namespaceName: + description: 命名空间名称 + type: string + appId: + description: 所属应用的唯一标识符 + type: string + clusterName: + description: 所属集群名称 + type: string + envName: + description: 环境名称 + type: string + instanceCount: + description: 该命名空间关联的实例数量 + type: integer + branchInstanceCount: + description: 分支命名空间关联的实例数量 + type: integer + linkedNamespaceCount: + description: 关联到该公共命名空间的命名空间数量 + type: integer + type: object OpenGrayReleaseRuleItemDTO: description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 example: @@ -4550,11 +4833,13 @@ components: items: type: string type: array + uniqueItems: true clientLabelList: description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 items: type: string type: array + uniqueItems: true type: object OpenGrayReleaseRuleDTO: description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 @@ -4614,6 +4899,28 @@ components: items: $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' type: array + uniqueItems: true + type: object + OpenCreateNamespaceDTO: + description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + example: + appNamespaceName: appNamespaceName + appId: appId + clusterName: clusterName + env: env + properties: + appId: + description: 所属应用的唯一标识符 + type: string + env: + description: 所在那个环境创建 + type: string + clusterName: + description: 所属集群的名称 + type: string + appNamespaceName: + description: 根据已创建的appnamespace来实例化namespace + type: string type: object OpenNamespaceDTO: description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 @@ -4626,23 +4933,41 @@ components: format: format isPublic: true comment: comment + extendInfo: + parentAppId: parentAppId + isConfigHidden: true + itemModifiedCnt: 0 items: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedTime: 2025-09-29T12:34:56Z namespaceName: namespaceName properties: @@ -4683,6 +5008,24 @@ components: items: $ref: '#/components/schemas/OpenItemDTO' type: array + extendInfo: + $ref: '#/components/schemas/OpenNamespaceExtendDTO' + type: object + OpenNamespaceExtendDTO: + example: + parentAppId: parentAppId + isConfigHidden: true + itemModifiedCnt: 0 + properties: + isConfigHidden: + description: 当当前用户无权限查看配置时置为 true + type: boolean + parentAppId: + description: 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + type: string + itemModifiedCnt: + description: 未发布变更数 + type: integer type: object OpenNamespaceLockDTO: description: Apollo命名空间锁状态数据传输对象 @@ -4690,6 +5033,7 @@ components: lockedBy: lockedBy isLocked: true namespaceName: namespaceName + isEmergencyPublishAllowed: true properties: namespaceName: description: 命名空间名称 @@ -4700,6 +5044,9 @@ components: lockedBy: description: 锁定者用户名 type: string + isEmergencyPublishAllowed: + description: 是否允许紧急发布 + type: boolean type: object OpenInstancePageDTO: description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 @@ -4924,180 +5271,171 @@ components: type: string type: object OpenItemChangeSets: + properties: + dataChangeCreatedBy: + description: 变更集合创建者用户名 + type: string + dataChangeLastModifiedBy: + description: 变更集合最后修改者用户名 + type: string + dataChangeCreatedByDisplayName: + description: 创建者显示名 + type: string + dataChangeLastModifiedByDisplayName: + description: 最后修改者显示名 + type: string + dataChangeCreatedTime: + description: 变更集合创建时间(ISO 8601) + example: 2025-09-29T12:34:56Z + type: string + dataChangeLastModifiedTime: + description: 变更集合最后修改时间(ISO 8601) + example: 2025-09-29T12:34:56Z + type: string + createItems: + default: [] + description: 待创建的配置项列表 + items: + $ref: '#/components/schemas/OpenItemDTO' + type: array + updateItems: + default: [] + description: 待更新的配置项列表 + items: + $ref: '#/components/schemas/OpenItemDTO' + type: array + deleteItems: + default: [] + description: 待删除的配置项列表 + items: + $ref: '#/components/schemas/OpenItemDTO' + type: array + type: object + OpenItemDiffDTO: example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy + code: 0 + namespace: + appId: appId + clusterName: clusterName + env: env + namespaceName: namespaceName deleteItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z createItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + message: message updateItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: - dataChangeCreatedBy: - description: 变更集合创建者用户名 - type: string - dataChangeLastModifiedBy: - description: 变更集合最后修改者用户名 - type: string - dataChangeCreatedByDisplayName: - description: 创建者显示名 - type: string - dataChangeLastModifiedByDisplayName: - description: 最后修改者显示名 - type: string - dataChangeCreatedTime: - description: 变更集合创建时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 变更集合最后修改时间(ISO 8601) - example: 2025-09-29T12:34:56Z + code: + description: 查找结果 + type: integer + message: + description: 查找结果信息 type: string + namespace: + $ref: '#/components/schemas/OpenNamespaceIdentifier' createItems: - default: [] - description: 待创建的配置项列表 items: $ref: '#/components/schemas/OpenItemDTO' type: array - updateItems: - default: [] - description: 待更新的配置项列表 + deleteItems: items: $ref: '#/components/schemas/OpenItemDTO' type: array - deleteItems: - default: [] - description: 待删除的配置项列表 + updateItems: items: $ref: '#/components/schemas/OpenItemDTO' type: array type: object - OpenItemDiffs: - example: - namespace: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - diffs: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - deleteItems: - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - createItems: - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - updateItems: - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - comment: comment - type: 0 - value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - extInfo: extInfo - properties: - namespace: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - diffs: - $ref: '#/components/schemas/OpenItemChangeSets' - extInfo: - description: 扩展信息 - type: string - type: object - OpenNamespaceSyncModel: + OpenNamespaceSyncDTO: example: syncItems: - dataChangeCreatedTime: 2025-09-29T12:34:56Z @@ -5105,17 +5443,31 @@ components: dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z dataChangeLastModifiedBy: dataChangeLastModifiedBy dataChangeCreatedBy: dataChangeCreatedBy comment: comment type: 0 + extendInfo: + newValue: newValue + isModified: true + isDeleted: true + namespaceId: 6 + oldValue: oldValue + isNewlyAdded: true value: value - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z key: key + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z syncToNamespaces: - appId: appId clusterName: clusterName @@ -5132,7 +5484,7 @@ components: $ref: '#/components/schemas/OpenNamespaceIdentifier' type: array syncItems: - description: 需要同步的配置项列表 + description: 需要修改的配置项列表 items: $ref: '#/components/schemas/OpenItemDTO' type: array @@ -5320,41 +5672,6 @@ components: projectB: darkMode: true type: object - MultiResponseEntity: - description: A response container holding multiple RichResponseEntity objects - properties: - code: - description: Overall HTTP status code - example: 200 - type: integer - entities: - description: List of rich response entities - items: - $ref: '#/components/schemas/RichResponseEntity' - type: array - required: - - code - - entities - type: object - RichResponseEntity: - description: "A wrapper for a single response entity with code, message, and\ - \ body" - properties: - code: - description: HTTP status code - example: 200 - type: integer - message: - description: Response message (can be string or object) - example: OK - type: object - body: - description: Response payload (generic type T) - type: object - required: - - code - - message - type: object securitySchemes: ApiKeyAuth: description: | diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES index 3a164a1..036c467 100644 --- a/typescript/.openapi-generator/FILES +++ b/typescript/.openapi-generator/FILES @@ -4,11 +4,13 @@ README.md package.json src/apis/AppManagementApi.ts +src/apis/AppNamespaceManagementApi.ts src/apis/ClusterManagementApi.ts src/apis/EnvironmentManagementApi.ts src/apis/InstanceManagementApi.ts src/apis/ItemManagementApi.ts src/apis/NamespaceBranchManagementApi.ts +src/apis/NamespaceLockManagementApi.ts src/apis/NamespaceManagementApi.ts src/apis/OrganizationManagementApi.ts src/apis/ReleaseManagementApi.ts @@ -16,13 +18,14 @@ src/apis/index.ts src/index.ts src/models/ExceptionResponse.ts src/models/KVEntity.ts -src/models/MultiResponseEntity.ts src/models/NamespaceGrayDelReleaseDTO.ts src/models/NamespaceReleaseDTO.ts src/models/OpenAppDTO.ts src/models/OpenAppNamespaceDTO.ts src/models/OpenClusterDTO.ts src/models/OpenCreateAppDTO.ts +src/models/OpenCreateItemDTO.ts +src/models/OpenCreateNamespaceDTO.ts src/models/OpenEnvClusterDTO.ts src/models/OpenEnvClusterInfo.ts src/models/OpenGrayReleaseRuleDTO.ts @@ -32,18 +35,20 @@ src/models/OpenInstanceDTO.ts src/models/OpenInstancePageDTO.ts src/models/OpenItemChangeSets.ts src/models/OpenItemDTO.ts -src/models/OpenItemDiffs.ts +src/models/OpenItemDiffDTO.ts +src/models/OpenItemExtendDTO.ts src/models/OpenItemPageDTO.ts src/models/OpenMissEnvDTO.ts src/models/OpenNamespaceDTO.ts +src/models/OpenNamespaceExtendDTO.ts src/models/OpenNamespaceIdentifier.ts src/models/OpenNamespaceLockDTO.ts -src/models/OpenNamespaceSyncModel.ts +src/models/OpenNamespaceSyncDTO.ts src/models/OpenNamespaceTextModel.ts +src/models/OpenNamespaceUsageDTO.ts src/models/OpenOrganizationDto.ts src/models/OpenReleaseBO.ts src/models/OpenReleaseDTO.ts -src/models/RichResponseEntity.ts src/models/index.ts src/runtime.ts tsconfig.json diff --git a/typescript/src/apis/AppManagementApi.ts b/typescript/src/apis/AppManagementApi.ts index b746b72..8c84078 100644 --- a/typescript/src/apis/AppManagementApi.ts +++ b/typescript/src/apis/AppManagementApi.ts @@ -439,7 +439,7 @@ export class AppManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * 获取应用的环境集群信息 (original openapi) */ async getEnvClustersRaw(requestParameters: GetEnvClustersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { @@ -466,7 +466,7 @@ export class AppManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/envClusters + * GET /openapi/v1/apps/{appId}/envclusters * 获取应用的环境集群信息 (original openapi) */ async getEnvClusters(requestParameters: GetEnvClustersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { diff --git a/typescript/src/apis/AppNamespaceManagementApi.ts b/typescript/src/apis/AppNamespaceManagementApi.ts new file mode 100644 index 0000000..7475881 --- /dev/null +++ b/typescript/src/apis/AppNamespaceManagementApi.ts @@ -0,0 +1,371 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { + ExceptionResponse, + OpenAppNamespaceDTO, + OpenNamespaceDTO, + OpenNamespaceUsageDTO, +} from '../models'; +import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, + OpenAppNamespaceDTOFromJSON, + OpenAppNamespaceDTOToJSON, + OpenNamespaceDTOFromJSON, + OpenNamespaceDTOToJSON, + OpenNamespaceUsageDTOFromJSON, + OpenNamespaceUsageDTOToJSON, +} from '../models'; + +export interface CreateAppNamespaceRequest { + appId: string; + openAppNamespaceDTO: OpenAppNamespaceDTO; + operator?: string; +} + +export interface DeleteAppNamespaceRequest { + appId: string; + namespaceName: string; + operator?: string; +} + +export interface FindAppNamespaceRequest { + appId: string; + namespaceName: string; + extendInfo?: boolean; +} + +export interface FindAppNamespaceUsageRequest { + appId: string; + namespaceName: string; +} + +export interface GetAppNamespacesByAppIdRequest { + appId: string; +} + +export interface GetPublicAppNamespaceInstancesRequest { + env: string; + publicNamespaceName: string; + page: number; + size: number; +} + +/** + * + */ +export class AppNamespaceManagementApi extends runtime.BaseAPI { + + /** + * POST /openapi/v1/apps/{appId}/appnamespaces + * 创建AppNamespace (original openapi) + */ + async createAppNamespaceRaw(requestParameters: CreateAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createAppNamespace.'); + } + + if (requestParameters.openAppNamespaceDTO === null || requestParameters.openAppNamespaceDTO === undefined) { + throw new runtime.RequiredError('openAppNamespaceDTO','Required parameter requestParameters.openAppNamespaceDTO was null or undefined when calling createAppNamespace.'); + } + + const queryParameters: any = {}; + + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + 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 (original openapi) + */ + async createAppNamespace(requestParameters: CreateAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createAppNamespaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除AppNamespace (new added) + */ + async deleteAppNamespaceRaw(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteAppNamespace.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteAppNamespace.'); + } + + const queryParameters: any = {}; + + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 删除AppNamespace (new added) + */ + async deleteAppNamespace(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteAppNamespaceRaw(requestParameters, initOverrides); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 获取指定的AppNamespace (new added) + */ + async findAppNamespaceRaw(requestParameters: FindAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findAppNamespace.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findAppNamespace.'); + } + + const queryParameters: any = {}; + + if (requestParameters.extendInfo !== undefined) { + queryParameters['extendInfo'] = requestParameters.extendInfo; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} + * 获取指定的AppNamespace (new added) + */ + async findAppNamespace(requestParameters: FindAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findAppNamespaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * 查询appnamespace使用情况(new added) + */ + async findAppNamespaceUsageRaw(requestParameters: FindAppNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findAppNamespaceUsage.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findAppNamespaceUsage.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceUsageDTOFromJSON)); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage + * 查询appnamespace使用情况(new added) + */ + async findAppNamespaceUsage(requestParameters: FindAppNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findAppNamespaceUsageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/appnamespaces/public + * 获取所有公共AppNamespace (new added) + */ + async getAppNamespacesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/appnamespaces`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); + } + + /** + * GET /openapi/v1/appnamespaces/public + * 获取所有公共AppNamespace (new added) + */ + async getAppNamespaces(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getAppNamespacesRaw(initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) + */ + async getAppNamespacesByAppIdRaw(requestParameters: GetAppNamespacesByAppIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getAppNamespacesByAppId.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); + } + + /** + * GET /openapi/v1/apps/{appId}/appnamespaces + * 获取指定应用的AppNamespace (new added) + */ + async getAppNamespacesByAppId(requestParameters: GetAppNamespacesByAppIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getAppNamespacesByAppIdRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances + * 获取公共AppNamespace的所有实例 (new added) + */ + async getPublicAppNamespaceInstancesRaw(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getPublicAppNamespaceInstances.'); + } + + if (requestParameters.publicNamespaceName === null || requestParameters.publicNamespaceName === undefined) { + throw new runtime.RequiredError('publicNamespaceName','Required parameter requestParameters.publicNamespaceName was null or undefined when calling getPublicAppNamespaceInstances.'); + } + + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getPublicAppNamespaceInstances.'); + } + + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getPublicAppNamespaceInstances.'); + } + + const queryParameters: any = {}; + + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"publicNamespaceName"}}`, encodeURIComponent(String(requestParameters.publicNamespaceName))), + 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的所有实例 (new added) + */ + async getPublicAppNamespaceInstances(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getPublicAppNamespaceInstancesRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/apis/ItemManagementApi.ts b/typescript/src/apis/ItemManagementApi.ts index de4baa2..8be9ec1 100644 --- a/typescript/src/apis/ItemManagementApi.ts +++ b/typescript/src/apis/ItemManagementApi.ts @@ -17,9 +17,9 @@ import * as runtime from '../runtime'; import type { ExceptionResponse, OpenItemDTO, - OpenItemDiffs, + OpenItemDiffDTO, OpenItemPageDTO, - OpenNamespaceSyncModel, + OpenNamespaceSyncDTO, OpenNamespaceTextModel, } from '../models'; import { @@ -27,12 +27,12 @@ import { ExceptionResponseToJSON, OpenItemDTOFromJSON, OpenItemDTOToJSON, - OpenItemDiffsFromJSON, - OpenItemDiffsToJSON, + OpenItemDiffDTOFromJSON, + OpenItemDiffDTOToJSON, OpenItemPageDTOFromJSON, OpenItemPageDTOToJSON, - OpenNamespaceSyncModelFromJSON, - OpenNamespaceSyncModelToJSON, + OpenNamespaceSyncDTOFromJSON, + OpenNamespaceSyncDTOToJSON, OpenNamespaceTextModelFromJSON, OpenNamespaceTextModelToJSON, } from '../models'; @@ -42,8 +42,8 @@ export interface BatchUpdateItemsByTextRequest { env: string; clusterName: string; namespaceName: string; - operator: string; openNamespaceTextModel: OpenNamespaceTextModel; + operator?: string; } export interface CompareItemsRequest { @@ -51,7 +51,7 @@ export interface CompareItemsRequest { env: string; clusterName: string; namespaceName: string; - openNamespaceSyncModel: OpenNamespaceSyncModel; + openNamespaceSyncDTO: OpenNamespaceSyncDTO; } export interface CreateItemRequest { @@ -59,8 +59,8 @@ export interface CreateItemRequest { env: string; clusterName: string; namespaceName: string; - operator: string; openItemDTO: OpenItemDTO; + operator?: string; } export interface DeleteItemRequest { @@ -69,7 +69,7 @@ export interface DeleteItemRequest { clusterName: string; namespaceName: string; key: string; - operator: string; + operator?: string; } export interface DeleteItemByEncodedKeyRequest { @@ -81,21 +81,21 @@ export interface DeleteItemByEncodedKeyRequest { operator: string; } -export interface FindItemsByNamespaceRequest { +export interface FindBranchItemsRequest { appId: string; env: string; clusterName: string; namespaceName: string; - page: number; - size: number; + branchName: string; } -export interface GetBranchItemsRequest { +export interface FindItemsByNamespaceRequest { appId: string; env: string; clusterName: string; namespaceName: string; - branchName: string; + page: number; + size: number; } export interface GetItemRequest { @@ -119,7 +119,7 @@ export interface RevertItemsRequest { env: string; clusterName: string; namespaceName: string; - operator: string; + operator?: string; } export interface SyncItemsRequest { @@ -127,21 +127,19 @@ export interface SyncItemsRequest { env: string; clusterName: string; namespaceName: string; - operator: string; - openNamespaceSyncModel: OpenNamespaceSyncModel; + openNamespaceSyncDTO: OpenNamespaceSyncDTO; + operator?: string; } -export interface UpdateItemRequest { +export interface SyntaxCheckRequest { appId: string; env: string; clusterName: string; namespaceName: string; - key: string; - createIfNotExists: boolean; - openItemDTO: OpenItemDTO; + openNamespaceTextModel: OpenNamespaceTextModel; } -export interface UpdateItemByEncodedKeyRequest { +export interface UpdateItemRequest { appId: string; env: string; clusterName: string; @@ -149,14 +147,18 @@ export interface UpdateItemByEncodedKeyRequest { key: string; createIfNotExists: boolean; openItemDTO: OpenItemDTO; + operator?: string; } -export interface ValidateItemsRequest { +export interface UpdateItemByEncodedKeyRequest { appId: string; env: string; clusterName: string; namespaceName: string; - openNamespaceTextModel: OpenNamespaceTextModel; + key: string; + createIfNotExists: boolean; + openItemDTO: OpenItemDTO; + operator?: string; } /** @@ -165,10 +167,10 @@ export interface ValidateItemsRequest { export class ItemManagementApi extends runtime.BaseAPI { /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * 通过文本批量修改配置项 (new added) */ - async batchUpdateItemsByTextRaw(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async batchUpdateItemsByTextRaw(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling batchUpdateItemsByText.'); } @@ -185,10 +187,6 @@ export class ItemManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling batchUpdateItemsByText.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling batchUpdateItemsByText.'); - } - if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling batchUpdateItemsByText.'); } @@ -208,30 +206,29 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'PUT', headers: headerParameters, query: queryParameters, body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: * 通过文本批量修改配置项 (new added) */ - async batchUpdateItemsByText(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.batchUpdateItemsByTextRaw(requestParameters, initOverrides); - return await response.value(); + async batchUpdateItemsByText(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.batchUpdateItemsByTextRaw(requestParameters, initOverrides); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * 对比命名空间配置差异 (new added) */ - async compareItemsRaw(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async compareItemsRaw(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling compareItems.'); } @@ -248,8 +245,8 @@ export class ItemManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling compareItems.'); } - if (requestParameters.openNamespaceSyncModel === null || requestParameters.openNamespaceSyncModel === undefined) { - throw new runtime.RequiredError('openNamespaceSyncModel','Required parameter requestParameters.openNamespaceSyncModel was null or undefined when calling compareItems.'); + if (requestParameters.openNamespaceSyncDTO === null || requestParameters.openNamespaceSyncDTO === undefined) { + throw new runtime.RequiredError('openNamespaceSyncDTO','Required parameter requestParameters.openNamespaceSyncDTO was null or undefined when calling compareItems.'); } const queryParameters: any = {}; @@ -263,21 +260,21 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenNamespaceSyncModelToJSON(requestParameters.openNamespaceSyncModel), + body: OpenNamespaceSyncDTOToJSON(requestParameters.openNamespaceSyncDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDiffsFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDiffDTOFromJSON)); } /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare + * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff * 对比命名空间配置差异 (new added) */ - async compareItems(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async compareItems(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.compareItemsRaw(requestParameters, initOverrides); return await response.value(); } @@ -303,10 +300,6 @@ export class ItemManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createItem.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling createItem.'); - } - if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling createItem.'); } @@ -349,7 +342,7 @@ export class ItemManagementApi extends runtime.BaseAPI { * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * 删除配置项 (original openapi) */ - async deleteItemRaw(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteItemRaw(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteItem.'); } @@ -370,10 +363,6 @@ export class ItemManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling deleteItem.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteItem.'); - } - const queryParameters: any = {}; if (requestParameters.operator !== undefined) { @@ -393,23 +382,22 @@ export class ItemManagementApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} * 删除配置项 (original openapi) */ - async deleteItem(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteItemRaw(requestParameters, initOverrides); - return await response.value(); + async deleteItem(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteItemRaw(requestParameters, initOverrides); } /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * 通过编码的key删除配置项 (original openapi) */ - async deleteItemByEncodedKeyRaw(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteItemByEncodedKeyRaw(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteItemByEncodedKey.'); } @@ -453,57 +441,44 @@ export class ItemManagementApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} * 通过编码的key删除配置项 (original openapi) */ - async deleteItemByEncodedKey(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteItemByEncodedKeyRaw(requestParameters, initOverrides); - return await response.value(); + async deleteItemByEncodedKey(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteItemByEncodedKeyRaw(requestParameters, initOverrides); } /** - * 获取指定命名空间的配置项列表,支持分页 - * 获取命名空间下的配置项列表 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取分支下的配置项 (new added) */ - async findItemsByNamespaceRaw(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async findBranchItemsRaw(requestParameters: FindBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findItemsByNamespace.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findBranchItems.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findItemsByNamespace.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findBranchItems.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findItemsByNamespace.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findBranchItems.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findItemsByNamespace.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findBranchItems.'); } - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findItemsByNamespace.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findItemsByNamespace.'); + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling findBranchItems.'); } const queryParameters: any = {}; - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -511,51 +486,63 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemPageDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDTOFromJSON)); } /** - * 获取指定命名空间的配置项列表,支持分页 - * 获取命名空间下的配置项列表 (original openapi) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: + * 获取分支下的配置项 (new added) */ - async findItemsByNamespace(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.findItemsByNamespaceRaw(requestParameters, initOverrides); + async findBranchItems(requestParameters: FindBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findBranchItemsRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * 获取分支下的配置项 (new added) + * 获取指定命名空间的配置项列表,支持分页 + * 获取命名空间下的配置项列表 (original openapi) */ - async getBranchItemsRaw(requestParameters: GetBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async findItemsByNamespaceRaw(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getBranchItems.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findItemsByNamespace.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getBranchItems.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findItemsByNamespace.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getBranchItems.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findItemsByNamespace.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getBranchItems.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findItemsByNamespace.'); } - if (requestParameters.branchName === null || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling getBranchItems.'); + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findItemsByNamespace.'); + } + + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findItemsByNamespace.'); } const queryParameters: any = {}; + if (requestParameters.page !== undefined) { + queryParameters['page'] = requestParameters.page; + } + + if (requestParameters.size !== undefined) { + queryParameters['size'] = requestParameters.size; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -563,21 +550,21 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDTOFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemPageDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * 获取分支下的配置项 (new added) + * 获取指定命名空间的配置项列表,支持分页 + * 获取命名空间下的配置项列表 (original openapi) */ - async getBranchItems(requestParameters: GetBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getBranchItemsRaw(requestParameters, initOverrides); + async findItemsByNamespace(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findItemsByNamespaceRaw(requestParameters, initOverrides); return await response.value(); } @@ -686,10 +673,10 @@ export class ItemManagementApi extends runtime.BaseAPI { } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * 撤销配置项更改 (new added) */ - async revertItemsRaw(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async revertItemsRaw(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling revertItems.'); } @@ -706,10 +693,6 @@ export class ItemManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling revertItems.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling revertItems.'); - } - const queryParameters: any = {}; if (requestParameters.operator !== undefined) { @@ -723,29 +706,28 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'POST', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation * 撤销配置项更改 (new added) */ - async revertItems(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.revertItemsRaw(requestParameters, initOverrides); - return await response.value(); + async revertItems(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.revertItemsRaw(requestParameters, initOverrides); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * 同步配置项到多个命名空间 (new added) */ - async syncItemsRaw(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async syncItemsRaw(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling syncItems.'); } @@ -762,12 +744,8 @@ export class ItemManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling syncItems.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling syncItems.'); - } - - if (requestParameters.openNamespaceSyncModel === null || requestParameters.openNamespaceSyncModel === undefined) { - throw new runtime.RequiredError('openNamespaceSyncModel','Required parameter requestParameters.openNamespaceSyncModel was null or undefined when calling syncItems.'); + if (requestParameters.openNamespaceSyncDTO === null || requestParameters.openNamespaceSyncDTO === undefined) { + throw new runtime.RequiredError('openNamespaceSyncDTO','Required parameter requestParameters.openNamespaceSyncDTO was null or undefined when calling syncItems.'); } const queryParameters: any = {}; @@ -785,64 +763,51 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenNamespaceSyncModelToJSON(requestParameters.openNamespaceSyncModel), + body: OpenNamespaceSyncDTOToJSON(requestParameters.openNamespaceSyncDTO), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/sync: + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: * 同步配置项到多个命名空间 (new added) */ - async syncItems(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.syncItemsRaw(requestParameters, initOverrides); - return await response.value(); + async syncItems(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.syncItemsRaw(requestParameters, initOverrides); } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation + * 验证配置文本语法 (new added) */ - async updateItemRaw(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async syntaxCheckRaw(requestParameters: SyntaxCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateItem.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling syntaxCheck.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItem.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling syntaxCheck.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItem.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling syntaxCheck.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateItem.'); - } - - if (requestParameters.key === null || requestParameters.key === undefined) { - throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItem.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling syntaxCheck.'); } - if (requestParameters.createIfNotExists === null || requestParameters.createIfNotExists === undefined) { - throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItem.'); - } - - if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { - throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItem.'); + if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { + throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling syntaxCheck.'); } const queryParameters: any = {}; - if (requestParameters.createIfNotExists !== undefined) { - queryParameters['createIfNotExists'] = requestParameters.createIfNotExists; - } - const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -852,56 +817,55 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), - method: 'PUT', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenItemDTOToJSON(requestParameters.openItemDTO), + body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 (original openapi) + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation + * 验证配置文本语法 (new added) */ - async updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateItemRaw(requestParameters, initOverrides); - return await response.value(); + async syntaxCheck(requestParameters: SyntaxCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.syntaxCheckRaw(requestParameters, initOverrides); } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 更新配置项 (original openapi) */ - async updateItemByEncodedKeyRaw(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateItemRaw(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateItem.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItem.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItem.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateItem.'); } if (requestParameters.key === null || requestParameters.key === undefined) { - throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItem.'); } if (requestParameters.createIfNotExists === null || requestParameters.createIfNotExists === undefined) { - throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItem.'); } if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { - throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItemByEncodedKey.'); + throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItem.'); } const queryParameters: any = {}; @@ -910,6 +874,10 @@ export class ItemManagementApi extends runtime.BaseAPI { queryParameters['createIfNotExists'] = requestParameters.createIfNotExists; } + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -919,52 +887,67 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), method: 'PUT', headers: headerParameters, query: queryParameters, body: OpenItemDTOToJSON(requestParameters.openItemDTO), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 (original openapi) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} + * 更新配置项 (original openapi) */ - async updateItemByEncodedKey(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateItemByEncodedKeyRaw(requestParameters, initOverrides); - return await response.value(); + async updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateItemRaw(requestParameters, initOverrides); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * 验证配置文本语法 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过编码的key更新配置项 (original openapi) */ - async validateItemsRaw(requestParameters: ValidateItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateItemByEncodedKeyRaw(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling validateItems.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateItemByEncodedKey.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling validateItems.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItemByEncodedKey.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling validateItems.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItemByEncodedKey.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling validateItems.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling updateItemByEncodedKey.'); } - if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { - throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling validateItems.'); + if (requestParameters.key === null || requestParameters.key === undefined) { + throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItemByEncodedKey.'); + } + + if (requestParameters.createIfNotExists === null || requestParameters.createIfNotExists === undefined) { + throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItemByEncodedKey.'); + } + + if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { + throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItemByEncodedKey.'); } const queryParameters: any = {}; + if (requestParameters.createIfNotExists !== undefined) { + queryParameters['createIfNotExists'] = requestParameters.createIfNotExists; + } + + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -974,23 +957,22 @@ export class ItemManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'POST', + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"key"}}`, encodeURIComponent(String(requestParameters.key))), + method: 'PUT', headers: headerParameters, query: queryParameters, - body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), + body: OpenItemDTOToJSON(requestParameters.openItemDTO), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate - * 验证配置文本语法 (new added) + * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} + * 通过编码的key更新配置项 (original openapi) */ - async validateItems(requestParameters: ValidateItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.validateItemsRaw(requestParameters, initOverrides); - return await response.value(); + async updateItemByEncodedKey(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateItemByEncodedKeyRaw(requestParameters, initOverrides); } } diff --git a/typescript/src/apis/NamespaceBranchManagementApi.ts b/typescript/src/apis/NamespaceBranchManagementApi.ts index 3b45da2..7cc1a38 100644 --- a/typescript/src/apis/NamespaceBranchManagementApi.ts +++ b/typescript/src/apis/NamespaceBranchManagementApi.ts @@ -39,7 +39,7 @@ export interface CreateBranchRequest { env: string; clusterName: string; namespaceName: string; - operator: string; + operator?: string; } export interface DeleteBranchRequest { @@ -56,6 +56,7 @@ export interface FindBranchRequest { env: string; clusterName: string; namespaceName: string; + extendInfo?: boolean; } export interface GetBranchGrayRulesRequest { @@ -66,6 +67,16 @@ export interface GetBranchGrayRulesRequest { branchName: string; } +export interface MergeRequest { + appId: string; + env: string; + clusterName: string; + namespaceName: string; + branchName: string; + deleteBranch: boolean; + namespaceReleaseDTO: NamespaceReleaseDTO; +} + export interface MergeBranchRequest { env: string; appId: string; @@ -73,8 +84,8 @@ export interface MergeBranchRequest { namespaceName: string; branchName: string; deleteBranch: boolean; - operator: string; namespaceReleaseDTO: NamespaceReleaseDTO; + operator?: string; } export interface UpdateBranchRulesRequest { @@ -113,10 +124,6 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createBranch.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling createBranch.'); - } - const queryParameters: any = {}; if (requestParameters.operator !== undefined) { @@ -152,7 +159,7 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * 删除命名空间分支 (original openapi) */ - async deleteBranchRaw(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteBranchRaw(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.env === null || requestParameters.env === undefined) { throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteBranch.'); } @@ -196,16 +203,15 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * 删除命名空间分支 (original openapi) */ - async deleteBranch(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteBranchRaw(requestParameters, initOverrides); - return await response.value(); + async deleteBranch(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteBranchRaw(requestParameters, initOverrides); } /** @@ -231,6 +237,10 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { const queryParameters: any = {}; + if (requestParameters.extendInfo !== undefined) { + queryParameters['extendInfo'] = requestParameters.extendInfo; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -309,7 +319,74 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { } /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * 合并灰度分支并可选择删除分支 + * 合并分支 (original openapi) + */ + async mergeRaw(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling merge.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling merge.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling merge.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling merge.'); + } + + if (requestParameters.branchName === null || requestParameters.branchName === undefined) { + throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling merge.'); + } + + if (requestParameters.deleteBranch === null || requestParameters.deleteBranch === undefined) { + throw new runtime.RequiredError('deleteBranch','Required parameter requestParameters.deleteBranch was null or undefined when calling merge.'); + } + + if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { + throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling merge.'); + } + + const queryParameters: any = {}; + + if (requestParameters.deleteBranch !== undefined) { + queryParameters['deleteBranch'] = requestParameters.deleteBranch; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); + } + + /** + * 合并灰度分支并可选择删除分支 + * 合并分支 (original openapi) + */ + async merge(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.mergeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * 合并分支到主分支 (new added) */ async mergeBranchRaw(requestParameters: MergeBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -337,10 +414,6 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('deleteBranch','Required parameter requestParameters.deleteBranch was null or undefined when calling mergeBranch.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling mergeBranch.'); - } - if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling mergeBranch.'); } @@ -365,7 +438,7 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { const response = await this.request({ path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), - method: 'PATCH', + method: 'POST', headers: headerParameters, query: queryParameters, body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), @@ -375,7 +448,7 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { } /** - * PATCH /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} 使用 PATCH 方法表示部分更新操作(将分支状态从\"独立\"更新为\"合并\") + * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} * 合并分支到主分支 (new added) */ async mergeBranch(requestParameters: MergeBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { @@ -387,7 +460,7 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * 更新分支灰度发布规则 (original openapi) */ - async updateBranchRulesRaw(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateBranchRulesRaw(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateBranchRules.'); } @@ -438,16 +511,15 @@ export class NamespaceBranchManagementApi extends runtime.BaseAPI { body: OpenGrayReleaseRuleDTOToJSON(requestParameters.openGrayReleaseRuleDTO), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules * 更新分支灰度发布规则 (original openapi) */ - async updateBranchRules(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.updateBranchRulesRaw(requestParameters, initOverrides); - return await response.value(); + async updateBranchRules(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.updateBranchRulesRaw(requestParameters, initOverrides); } } diff --git a/typescript/src/apis/NamespaceLockManagementApi.ts b/typescript/src/apis/NamespaceLockManagementApi.ts new file mode 100644 index 0000000..518e957 --- /dev/null +++ b/typescript/src/apis/NamespaceLockManagementApi.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { + OpenNamespaceLockDTO, +} from '../models'; +import { + OpenNamespaceLockDTOFromJSON, + OpenNamespaceLockDTOToJSON, +} from '../models'; + +export interface GetNamespaceLockRequest { + appId: string; + env: string; + clusterName: string; + namespaceName: string; +} + +/** + * + */ +export class NamespaceLockManagementApi extends runtime.BaseAPI { + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取Namespace的锁状态 (original openapi) + */ + async getNamespaceLockRaw(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespaceLock.'); + } + + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getNamespaceLock.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getNamespaceLock.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getNamespaceLock.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceLockDTOFromJSON(jsonValue)); + } + + /** + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock + * 获取Namespace的锁状态 (original openapi) + */ + async getNamespaceLock(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getNamespaceLockRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/typescript/src/apis/NamespaceManagementApi.ts b/typescript/src/apis/NamespaceManagementApi.ts index 013b011..a196746 100644 --- a/typescript/src/apis/NamespaceManagementApi.ts +++ b/typescript/src/apis/NamespaceManagementApi.ts @@ -15,98 +15,79 @@ import * as runtime from '../runtime'; import type { - ExceptionResponse, - OpenAppNamespaceDTO, + OpenCreateNamespaceDTO, OpenNamespaceDTO, - OpenNamespaceLockDTO, + OpenNamespaceUsageDTO, } from '../models'; import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenAppNamespaceDTOFromJSON, - OpenAppNamespaceDTOToJSON, + OpenCreateNamespaceDTOFromJSON, + OpenCreateNamespaceDTOToJSON, OpenNamespaceDTOFromJSON, OpenNamespaceDTOToJSON, - OpenNamespaceLockDTOFromJSON, - OpenNamespaceLockDTOToJSON, + OpenNamespaceUsageDTOFromJSON, + OpenNamespaceUsageDTOToJSON, } from '../models'; -export interface CheckNamespaceIntegrityRequest { +export interface CreateMissingNamespacesRequest { appId: string; env: string; clusterName: string; + operator?: string; } -export interface CreateNamespaceRequest { - appId: string; - openAppNamespaceDTO: OpenAppNamespaceDTO; -} - -export interface DeleteAppNamespaceRequest { - appId: string; - namespaceName: string; - operator: string; +export interface CreateNamespacesRequest { + openCreateNamespaceDTO: Array; + operator?: string; } -export interface DeleteNamespaceLinksRequest { +export interface DeleteNamespaceRequest { appId: string; env: string; clusterName: string; namespaceName: string; - operator: string; + operator?: string; } -export interface FindNamespacesRequest { +export interface FindMissingNamespacesRequest { appId: string; env: string; clusterName: string; - fillItemDetail: boolean; } -export interface GetAppNamespaceRequest { +export interface FindNamespaceRequest { appId: string; + env: string; + clusterName: string; namespaceName: string; + fillItemDetail: boolean; + extendInfo?: boolean; } -export interface GetAppNamespacesRequest { - publicOnly: boolean; -} - -export interface GetAppNamespacesByAppRequest { - appId: string; -} - -export interface GetNamespaceLockRequest { +export interface FindNamespaceUsageRequest { appId: string; env: string; clusterName: string; namespaceName: string; } -export interface GetNamespacesReleaseStatusRequest { +export interface FindNamespacesRequest { appId: string; -} - -export interface GetPublicAppNamespaceInstancesRequest { env: string; - publicNamespaceName: string; - page: number; - size: number; + clusterName: string; + fillItemDetail: boolean; + extendInfo?: boolean; } -export interface GetPublicNamespaceAssociationRequest { - appId: string; +export interface FindPublicNamespaceForAssociatedNamespaceRequest { env: string; + appId: string; clusterName: string; namespaceName: string; + extendInfo?: boolean; } -export interface LoadNamespaceRequest { +export interface GetNamespacesReleaseStatusRequest { appId: string; - env: string; - clusterName: string; - namespaceName: string; - fillItemDetail: boolean; } /** @@ -115,107 +96,60 @@ export interface LoadNamespaceRequest { export class NamespaceManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check - * 检查缺失的Namespace (new added) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces + * 创建缺失的Namespace (new added) */ - async checkNamespaceIntegrityRaw(requestParameters: CheckNamespaceIntegrityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async createMissingNamespacesRaw(requestParameters: CreateMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling checkNamespaceIntegrity.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createMissingNamespaces.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling checkNamespaceIntegrity.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createMissingNamespaces.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling checkNamespaceIntegrity.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createMissingNamespaces.'); } const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/integrity-check`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), - 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 (new added) - */ - async checkNamespaceIntegrity(requestParameters: CheckNamespaceIntegrityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.checkNamespaceIntegrityRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace (original openapi) - */ - async createNamespaceRaw(requestParameters: CreateNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createNamespace.'); - } - - if (requestParameters.openAppNamespaceDTO === null || requestParameters.openAppNamespaceDTO === undefined) { - throw new runtime.RequiredError('openAppNamespaceDTO','Required parameter requestParameters.openAppNamespaceDTO was null or undefined when calling createNamespace.'); + if (requestParameters.operator !== undefined) { + queryParameters['operator'] = requestParameters.operator; } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; - if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), method: 'POST', headers: headerParameters, query: queryParameters, - body: OpenAppNamespaceDTOToJSON(requestParameters.openAppNamespaceDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace (original openapi) + * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces + * 创建缺失的Namespace (new added) */ - async createNamespace(requestParameters: CreateNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createNamespaceRaw(requestParameters, initOverrides); + async createMissingNamespaces(requestParameters: CreateMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createMissingNamespacesRaw(requestParameters, initOverrides); return await response.value(); } /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace (new added) + * POST /openapi/v1/apps/{appId}/namespaces + * 创建Namespace (new added) */ - async deleteAppNamespaceRaw(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteAppNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteAppNamespace.'); - } - - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteAppNamespace.'); + async createNamespacesRaw(requestParameters: CreateNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.openCreateNamespaceDTO === null || requestParameters.openCreateNamespaceDTO === undefined) { + throw new runtime.RequiredError('openCreateNamespaceDTO','Required parameter requestParameters.openCreateNamespaceDTO was null or undefined when calling createNamespaces.'); } const queryParameters: any = {}; @@ -226,52 +160,50 @@ export class NamespaceManagementApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'DELETE', + path: `/openapi/v1/namespaces`, + method: 'POST', headers: headerParameters, query: queryParameters, + body: requestParameters.openCreateNamespaceDTO.map(OpenCreateNamespaceDTOToJSON), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace (new added) + * POST /openapi/v1/apps/{appId}/namespaces + * 创建Namespace (new added) */ - async deleteAppNamespace(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteAppNamespaceRaw(requestParameters, initOverrides); - return await response.value(); + async createNamespaces(requestParameters: CreateNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.createNamespacesRaw(requestParameters, initOverrides); } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * 删除关联的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} + * 删除指定的Namespace (new added) */ - async deleteNamespaceLinksRaw(requestParameters: DeleteNamespaceLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async deleteNamespaceRaw(requestParameters: DeleteNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteNamespaceLinks.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteNamespace.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteNamespaceLinks.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteNamespace.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteNamespaceLinks.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteNamespace.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteNamespaceLinks.'); - } - - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteNamespaceLinks.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteNamespace.'); } const queryParameters: any = {}; @@ -287,51 +219,42 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.VoidApiResponse(response); } /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/links - * 删除关联的Namespace (new added) + * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} + * 删除指定的Namespace (new added) */ - async deleteNamespaceLinks(requestParameters: DeleteNamespaceLinksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteNamespaceLinksRaw(requestParameters, initOverrides); - return await response.value(); + async deleteNamespace(requestParameters: DeleteNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + await this.deleteNamespaceRaw(requestParameters, initOverrides); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces + * 查找缺失的Namespace (new added) */ - async findNamespacesRaw(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async findMissingNamespacesRaw(requestParameters: FindMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespaces.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findMissingNamespaces.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespaces.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findMissingNamespaces.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespaces.'); - } - - if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { - throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling findNamespaces.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findMissingNamespaces.'); } const queryParameters: any = {}; - if (requestParameters.fillItemDetail !== undefined) { - queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -339,115 +262,59 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceDTOFromJSON)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace (original openapi) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces + * 查找缺失的Namespace (new added) */ - async findNamespaces(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findNamespacesRaw(requestParameters, initOverrides); + async findMissingNamespaces(requestParameters: FindMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findMissingNamespacesRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定的Namespace (original openapi) */ - async getAppNamespaceRaw(requestParameters: GetAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async findNamespaceRaw(requestParameters: FindNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getAppNamespace.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespace.'); } - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getAppNamespace.'); + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespace.'); } - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespace.'); } - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace (new added) - */ - async getAppNamespace(requestParameters: GetAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAppNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/appnamespaces?public=true - * 获取所有公共AppNamespace (new added) - */ - async getAppNamespacesRaw(requestParameters: GetAppNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.publicOnly === null || requestParameters.publicOnly === undefined) { - throw new runtime.RequiredError('publicOnly','Required parameter requestParameters.publicOnly was null or undefined when calling getAppNamespaces.'); + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findNamespace.'); } - const queryParameters: any = {}; - - if (requestParameters.publicOnly !== undefined) { - queryParameters['publicOnly'] = requestParameters.publicOnly; + if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { + throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling findNamespace.'); } - const headerParameters: runtime.HTTPHeaders = {}; + const queryParameters: any = {}; - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + if (requestParameters.fillItemDetail !== undefined) { + queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; } - const response = await this.request({ - path: `/openapi/v1/appnamespaces`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/appnamespaces?public=true - * 获取所有公共AppNamespace (new added) - */ - async getAppNamespaces(requestParameters: GetAppNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getAppNamespacesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace (new added) - */ - async getAppNamespacesByAppRaw(requestParameters: GetAppNamespacesByAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getAppNamespacesByApp.'); + if (requestParameters.extendInfo !== undefined) { + queryParameters['extendInfo'] = requestParameters.extendInfo; } - const queryParameters: any = {}; - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -455,43 +322,43 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} + * 获取指定的Namespace (original openapi) */ - async getAppNamespacesByApp(requestParameters: GetAppNamespacesByAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getAppNamespacesByAppRaw(requestParameters, initOverrides); + async findNamespace(requestParameters: FindNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findNamespaceRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 (original openapi) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage + * 查询namespace使用情况(new added) */ - async getNamespaceLockRaw(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async findNamespaceUsageRaw(requestParameters: FindNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespaceLock.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespaceUsage.'); } if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getNamespaceLock.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespaceUsage.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getNamespaceLock.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespaceUsage.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getNamespaceLock.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findNamespaceUsage.'); } const queryParameters: any = {}; @@ -503,89 +370,53 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceLockDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceUsageDTOFromJSON)); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 (original openapi) + * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage + * 查询namespace使用情况(new added) */ - async getNamespaceLock(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getNamespaceLockRaw(requestParameters, initOverrides); + async findNamespaceUsage(requestParameters: FindNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findNamespaceUsageRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定集群下的所有Namespace (original openapi) */ - async getNamespacesReleaseStatusRaw(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async findNamespacesRaw(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespacesReleaseStatus.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespaces.'); } - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/releases/status`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 (new added) - */ - async getNamespacesReleaseStatus(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: boolean; }; }> { - const response = await this.getNamespacesReleaseStatusRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 (new added) - */ - async getPublicAppNamespaceInstancesRaw(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getPublicAppNamespaceInstances.'); - } - - if (requestParameters.publicNamespaceName === null || requestParameters.publicNamespaceName === undefined) { - throw new runtime.RequiredError('publicNamespaceName','Required parameter requestParameters.publicNamespaceName was null or undefined when calling getPublicAppNamespaceInstances.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespaces.'); } - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getPublicAppNamespaceInstances.'); + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespaces.'); } - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getPublicAppNamespaceInstances.'); + if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { + throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling findNamespaces.'); } const queryParameters: any = {}; - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; + if (requestParameters.fillItemDetail !== undefined) { + queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; } - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; + if (requestParameters.extendInfo !== undefined) { + queryParameters['extendInfo'] = requestParameters.extendInfo; } const headerParameters: runtime.HTTPHeaders = {}; @@ -595,7 +426,7 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"publicNamespaceName"}}`, encodeURIComponent(String(requestParameters.publicNamespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -605,37 +436,41 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces + * 获取指定集群下的所有Namespace (original openapi) */ - async getPublicAppNamespaceInstances(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getPublicAppNamespaceInstancesRaw(requestParameters, initOverrides); + async findNamespaces(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.findNamespacesRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * 获取关联的公共Namespace (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace + * 查询关联Namespace对应的公共Namespace详情 (new added) */ - async getPublicNamespaceAssociationRaw(requestParameters: GetPublicNamespaceAssociationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getPublicNamespaceAssociation.'); + async findPublicNamespaceForAssociatedNamespaceRaw(requestParameters: FindPublicNamespaceForAssociatedNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.env === null || requestParameters.env === undefined) { + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); } - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getPublicNamespaceAssociation.'); + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getPublicNamespaceAssociation.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getPublicNamespaceAssociation.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); } const queryParameters: any = {}; + if (requestParameters.extendInfo !== undefined) { + queryParameters['extendInfo'] = requestParameters.extendInfo; + } + const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -643,7 +478,7 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -653,45 +488,25 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/public-association - * 获取关联的公共Namespace (new added) + * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace + * 查询关联Namespace对应的公共Namespace详情 (new added) */ - async getPublicNamespaceAssociation(requestParameters: GetPublicNamespaceAssociationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getPublicNamespaceAssociationRaw(requestParameters, initOverrides); + async findPublicNamespaceForAssociatedNamespace(requestParameters: FindPublicNamespaceForAssociatedNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.findPublicNamespaceForAssociatedNamespaceRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace (original openapi) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取应用下所有Namespace的发布状态 (new added) */ - async loadNamespaceRaw(requestParameters: LoadNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getNamespacesReleaseStatusRaw(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling loadNamespace.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling loadNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling loadNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling loadNamespace.'); - } - - if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { - throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling loadNamespace.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespacesReleaseStatus.'); } const queryParameters: any = {}; - if (requestParameters.fillItemDetail !== undefined) { - queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; - } - const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.apiKey) { @@ -699,21 +514,21 @@ export class NamespaceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/apps/{appId}/namespaces/releases/status`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace (original openapi) + * GET /openapi/v1/apps/{appId}/namespaces/releases/status + * 获取应用下所有Namespace的发布状态 (new added) */ - async loadNamespace(requestParameters: LoadNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.loadNamespaceRaw(requestParameters, initOverrides); + async getNamespacesReleaseStatus(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: boolean; }; }> { + const response = await this.getNamespacesReleaseStatusRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/ReleaseManagementApi.ts b/typescript/src/apis/ReleaseManagementApi.ts index 558c126..ac583c0 100644 --- a/typescript/src/apis/ReleaseManagementApi.ts +++ b/typescript/src/apis/ReleaseManagementApi.ts @@ -90,20 +90,10 @@ export interface LoadLatestActiveReleaseRequest { namespaceName: string; } -export interface MergeRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - deleteBranch: boolean; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - export interface RollbackRequest { env: string; releaseId: number; - operator: string; + operator?: string; } /** @@ -500,73 +490,6 @@ export class ReleaseManagementApi extends runtime.BaseAPI { return await response.value(); } - /** - * 合并灰度分支并可选择删除分支 - * 合并分支 (original openapi) - */ - async mergeRaw(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling merge.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling merge.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling merge.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling merge.'); - } - - if (requestParameters.branchName === null || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling merge.'); - } - - if (requestParameters.deleteBranch === null || requestParameters.deleteBranch === undefined) { - throw new runtime.RequiredError('deleteBranch','Required parameter requestParameters.deleteBranch was null or undefined when calling merge.'); - } - - if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { - throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling merge.'); - } - - const queryParameters: any = {}; - - if (requestParameters.deleteBranch !== undefined) { - queryParameters['deleteBranch'] = requestParameters.deleteBranch; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * 合并灰度分支并可选择删除分支 - * 合并分支 (original openapi) - */ - async merge(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.mergeRaw(requestParameters, initOverrides); - return await response.value(); - } - /** * 回滚到指定的发布版本 * 回滚发布 (original openapi) @@ -580,10 +503,6 @@ export class ReleaseManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling rollback.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling rollback.'); - } - const queryParameters: any = {}; if (requestParameters.operator !== undefined) { diff --git a/typescript/src/apis/index.ts b/typescript/src/apis/index.ts index 0b89222..e84d125 100644 --- a/typescript/src/apis/index.ts +++ b/typescript/src/apis/index.ts @@ -1,11 +1,13 @@ /* tslint:disable */ /* eslint-disable */ export * from './AppManagementApi'; +export * from './AppNamespaceManagementApi'; export * from './ClusterManagementApi'; export * from './EnvironmentManagementApi'; export * from './InstanceManagementApi'; export * from './ItemManagementApi'; export * from './NamespaceBranchManagementApi'; +export * from './NamespaceLockManagementApi'; export * from './NamespaceManagementApi'; export * from './OrganizationManagementApi'; export * from './ReleaseManagementApi'; diff --git a/typescript/src/models/MultiResponseEntity.ts b/typescript/src/models/MultiResponseEntity.ts deleted file mode 100644 index b244e86..0000000 --- a/typescript/src/models/MultiResponseEntity.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

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\"
- * - * 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 { exists, mapValues } from '../runtime'; -import type { RichResponseEntity } from './RichResponseEntity'; -import { - RichResponseEntityFromJSON, - RichResponseEntityFromJSONTyped, - RichResponseEntityToJSON, -} from './RichResponseEntity'; - -/** - * A response container holding multiple RichResponseEntity objects - * @export - * @interface MultiResponseEntity - */ -export interface MultiResponseEntity { - /** - * Overall HTTP status code - * @type {number} - * @memberof MultiResponseEntity - */ - code: number; - /** - * List of rich response entities - * @type {Array} - * @memberof MultiResponseEntity - */ - entities: Array; -} - -/** - * Check if a given object implements the MultiResponseEntity interface. - */ -export function instanceOfMultiResponseEntity(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "code" in value; - isInstance = isInstance && "entities" in value; - - return isInstance; -} - -export function MultiResponseEntityFromJSON(json: any): MultiResponseEntity { - return MultiResponseEntityFromJSONTyped(json, false); -} - -export function MultiResponseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): MultiResponseEntity { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': json['code'], - 'entities': ((json['entities'] as Array).map(RichResponseEntityFromJSON)), - }; -} - -export function MultiResponseEntityToJSON(value?: MultiResponseEntity | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'entities': ((value.entities as Array).map(RichResponseEntityToJSON)), - }; -} diff --git a/typescript/src/models/OpenCreateItemDTO.ts b/typescript/src/models/OpenCreateItemDTO.ts new file mode 100644 index 0000000..4bba0c1 --- /dev/null +++ b/typescript/src/models/OpenCreateItemDTO.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface OpenCreateItemDTO + */ +export interface OpenCreateItemDTO { + /** + * 配置项的键名,在同一命名空间内唯一标识一个配置项 + * @type {string} + * @memberof OpenCreateItemDTO + */ + key?: string; + /** + * 配置项类型,0表示普通配置项,1表示文件类型配置项 + * @type {number} + * @memberof OpenCreateItemDTO + */ + type?: number; + /** + * 配置项的值,可以是字符串、数字、JSON等格式 + * @type {string} + * @memberof OpenCreateItemDTO + */ + value?: string; + /** + * 配置项的注释说明,用于描述配置项的用途和含义 + * @type {string} + * @memberof OpenCreateItemDTO + */ + comment?: string; +} + +/** + * Check if a given object implements the OpenCreateItemDTO interface. + */ +export function instanceOfOpenCreateItemDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenCreateItemDTOFromJSON(json: any): OpenCreateItemDTO { + return OpenCreateItemDTOFromJSONTyped(json, false); +} + +export function OpenCreateItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenCreateItemDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'key': !exists(json, 'key') ? undefined : json['key'], + 'type': !exists(json, 'type') ? undefined : json['type'], + 'value': !exists(json, 'value') ? undefined : json['value'], + 'comment': !exists(json, 'comment') ? undefined : json['comment'], + }; +} + +export function OpenCreateItemDTOToJSON(value?: OpenCreateItemDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'key': value.key, + 'type': value.type, + 'value': value.value, + 'comment': value.comment, + }; +} diff --git a/typescript/src/models/OpenCreateNamespaceDTO.ts b/typescript/src/models/OpenCreateNamespaceDTO.ts new file mode 100644 index 0000000..b409016 --- /dev/null +++ b/typescript/src/models/OpenCreateNamespaceDTO.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { exists, mapValues } from '../runtime'; +/** + * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 + * @export + * @interface OpenCreateNamespaceDTO + */ +export interface OpenCreateNamespaceDTO { + /** + * 所属应用的唯一标识符 + * @type {string} + * @memberof OpenCreateNamespaceDTO + */ + appId?: string; + /** + * 所在那个环境创建 + * @type {string} + * @memberof OpenCreateNamespaceDTO + */ + env?: string; + /** + * 所属集群的名称 + * @type {string} + * @memberof OpenCreateNamespaceDTO + */ + clusterName?: string; + /** + * 根据已创建的appnamespace来实例化namespace + * @type {string} + * @memberof OpenCreateNamespaceDTO + */ + appNamespaceName?: string; +} + +/** + * Check if a given object implements the OpenCreateNamespaceDTO interface. + */ +export function instanceOfOpenCreateNamespaceDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenCreateNamespaceDTOFromJSON(json: any): OpenCreateNamespaceDTO { + return OpenCreateNamespaceDTOFromJSONTyped(json, false); +} + +export function OpenCreateNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenCreateNamespaceDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'env': !exists(json, 'env') ? undefined : json['env'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'appNamespaceName': !exists(json, 'appNamespaceName') ? undefined : json['appNamespaceName'], + }; +} + +export function OpenCreateNamespaceDTOToJSON(value?: OpenCreateNamespaceDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'appId': value.appId, + 'env': value.env, + 'clusterName': value.clusterName, + 'appNamespaceName': value.appNamespaceName, + }; +} diff --git a/typescript/src/models/OpenGrayReleaseRuleDTO.ts b/typescript/src/models/OpenGrayReleaseRuleDTO.ts index bfac795..347d7ae 100644 --- a/typescript/src/models/OpenGrayReleaseRuleDTO.ts +++ b/typescript/src/models/OpenGrayReleaseRuleDTO.ts @@ -76,10 +76,10 @@ export interface OpenGrayReleaseRuleDTO { branchName?: string; /** * 灰度发布规则项列表,包含具体的灰度规则条件 - * @type {Array} + * @type {Set} * @memberof OpenGrayReleaseRuleDTO */ - ruleItems?: Array; + ruleItems?: Set; } /** @@ -109,7 +109,7 @@ export function OpenGrayReleaseRuleDTOFromJSONTyped(json: any, ignoreDiscriminat 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], 'branchName': !exists(json, 'branchName') ? undefined : json['branchName'], - 'ruleItems': !exists(json, 'ruleItems') ? undefined : ((json['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOFromJSON)), + 'ruleItems': !exists(json, 'ruleItems') ? undefined : (new Set((json['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOFromJSON))), }; } @@ -130,6 +130,6 @@ export function OpenGrayReleaseRuleDTOToJSON(value?: OpenGrayReleaseRuleDTO | nu 'clusterName': value.clusterName, 'namespaceName': value.namespaceName, 'branchName': value.branchName, - 'ruleItems': value.ruleItems === undefined ? undefined : ((value.ruleItems as Array).map(OpenGrayReleaseRuleItemDTOToJSON)), + 'ruleItems': value.ruleItems === undefined ? undefined : (Array.from(value.ruleItems as Set).map(OpenGrayReleaseRuleItemDTOToJSON)), }; } diff --git a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts b/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts index 348c56a..3142ada 100644 --- a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts +++ b/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts @@ -27,16 +27,16 @@ export interface OpenGrayReleaseRuleItemDTO { clientAppId?: string; /** * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - * @type {Array} + * @type {Set} * @memberof OpenGrayReleaseRuleItemDTO */ - clientIpList?: Array; + clientIpList?: Set; /** * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - * @type {Array} + * @type {Set} * @memberof OpenGrayReleaseRuleItemDTO */ - clientLabelList?: Array; + clientLabelList?: Set; } /** @@ -74,7 +74,7 @@ export function OpenGrayReleaseRuleItemDTOToJSON(value?: OpenGrayReleaseRuleItem return { 'clientAppId': value.clientAppId, - 'clientIpList': value.clientIpList, - 'clientLabelList': value.clientLabelList, + 'clientIpList': value.clientIpList === undefined ? undefined : Array.from(value.clientIpList as Set), + 'clientLabelList': value.clientLabelList === undefined ? undefined : Array.from(value.clientLabelList as Set), }; } diff --git a/typescript/src/models/OpenItemDTO.ts b/typescript/src/models/OpenItemDTO.ts index 7ae6abc..b1d1249 100644 --- a/typescript/src/models/OpenItemDTO.ts +++ b/typescript/src/models/OpenItemDTO.ts @@ -13,60 +13,73 @@ */ import { exists, mapValues } from '../runtime'; +import type { OpenItemExtendDTO } from './OpenItemExtendDTO'; +import { + OpenItemExtendDTOFromJSON, + OpenItemExtendDTOFromJSONTyped, + OpenItemExtendDTOToJSON, +} from './OpenItemExtendDTO'; + /** - * Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 + * Apollo配置项核心数据对象,仅包含键值及基础审计信息 * @export * @interface OpenItemDTO */ export interface OpenItemDTO { /** - * 配置项创建者用户名,记录是谁创建了这个配置项 + * 配置项的键名,在同一命名空间内唯一标识一个配置项 * @type {string} * @memberof OpenItemDTO */ - dataChangeCreatedBy?: string; + key?: string; /** - * 配置项最后修改者用户名,记录最后一次修改配置的用户 + * 配置项的值,可以是字符串、数字、JSON等格式 * @type {string} * @memberof OpenItemDTO */ - dataChangeLastModifiedBy?: string; + value?: string; /** - * 配置项创建时间,ISO 8601格式的时间戳 - * @type {string} + * 配置项类型 + * @type {number} * @memberof OpenItemDTO */ - dataChangeCreatedTime?: string; + type?: number; /** - * 配置项最后修改时间,ISO 8601格式的时间戳 + * 配置项的注释说明,用于描述配置项的用途和含义 * @type {string} * @memberof OpenItemDTO */ - dataChangeLastModifiedTime?: string; + comment?: string; /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 + * + * @type {OpenItemExtendDTO} + * @memberof OpenItemDTO + */ + extendInfo?: OpenItemExtendDTO; + /** + * 配置项创建者用户名,记录是谁创建了这个配置项 * @type {string} * @memberof OpenItemDTO */ - key?: string; + dataChangeCreatedBy?: string; /** - * 配置项类型,0表示普通配置项,1表示文件类型配置项 - * @type {number} + * 配置项最后修改者用户名,记录最后一次修改配置的用户 + * @type {string} * @memberof OpenItemDTO */ - type?: number; + dataChangeLastModifiedBy?: string; /** - * 配置项的值,可以是字符串、数字、JSON等格式 + * 配置项创建时间,ISO 8601格式的时间戳 * @type {string} * @memberof OpenItemDTO */ - value?: string; + dataChangeCreatedTime?: string; /** - * 配置项的注释说明,用于描述配置项的用途和含义 + * 配置项最后修改时间,ISO 8601格式的时间戳 * @type {string} * @memberof OpenItemDTO */ - comment?: string; + dataChangeLastModifiedTime?: string; } /** @@ -88,14 +101,15 @@ export function OpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean } return { + 'key': !exists(json, 'key') ? undefined : json['key'], + 'value': !exists(json, 'value') ? undefined : json['value'], + 'type': !exists(json, 'type') ? undefined : json['type'], + 'comment': !exists(json, 'comment') ? undefined : json['comment'], + 'extendInfo': !exists(json, 'extendInfo') ? undefined : OpenItemExtendDTOFromJSON(json['extendInfo']), 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], - 'key': !exists(json, 'key') ? undefined : json['key'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'value': !exists(json, 'value') ? undefined : json['value'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], }; } @@ -108,13 +122,14 @@ export function OpenItemDTOToJSON(value?: OpenItemDTO | null): any { } return { + 'key': value.key, + 'value': value.value, + 'type': value.type, + 'comment': value.comment, + 'extendInfo': OpenItemExtendDTOToJSON(value.extendInfo), '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/OpenItemDiffDTO.ts b/typescript/src/models/OpenItemDiffDTO.ts new file mode 100644 index 0000000..1b7d07b --- /dev/null +++ b/typescript/src/models/OpenItemDiffDTO.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { exists, mapValues } from '../runtime'; +import type { OpenItemDTO } from './OpenItemDTO'; +import { + OpenItemDTOFromJSON, + OpenItemDTOFromJSONTyped, + OpenItemDTOToJSON, +} from './OpenItemDTO'; +import type { OpenNamespaceIdentifier } from './OpenNamespaceIdentifier'; +import { + OpenNamespaceIdentifierFromJSON, + OpenNamespaceIdentifierFromJSONTyped, + OpenNamespaceIdentifierToJSON, +} from './OpenNamespaceIdentifier'; + +/** + * + * @export + * @interface OpenItemDiffDTO + */ +export interface OpenItemDiffDTO { + /** + * 查找结果 + * @type {number} + * @memberof OpenItemDiffDTO + */ + code?: number; + /** + * 查找结果信息 + * @type {string} + * @memberof OpenItemDiffDTO + */ + message?: string; + /** + * + * @type {OpenNamespaceIdentifier} + * @memberof OpenItemDiffDTO + */ + namespace?: OpenNamespaceIdentifier; + /** + * + * @type {Array} + * @memberof OpenItemDiffDTO + */ + createItems?: Array; + /** + * + * @type {Array} + * @memberof OpenItemDiffDTO + */ + deleteItems?: Array; + /** + * + * @type {Array} + * @memberof OpenItemDiffDTO + */ + updateItems?: Array; +} + +/** + * Check if a given object implements the OpenItemDiffDTO interface. + */ +export function instanceOfOpenItemDiffDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenItemDiffDTOFromJSON(json: any): OpenItemDiffDTO { + return OpenItemDiffDTOFromJSONTyped(json, false); +} + +export function OpenItemDiffDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDiffDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'code': !exists(json, 'code') ? undefined : json['code'], + 'message': !exists(json, 'message') ? undefined : json['message'], + 'namespace': !exists(json, 'namespace') ? undefined : OpenNamespaceIdentifierFromJSON(json['namespace']), + 'createItems': !exists(json, 'createItems') ? undefined : ((json['createItems'] as Array).map(OpenItemDTOFromJSON)), + 'deleteItems': !exists(json, 'deleteItems') ? undefined : ((json['deleteItems'] as Array).map(OpenItemDTOFromJSON)), + 'updateItems': !exists(json, 'updateItems') ? undefined : ((json['updateItems'] as Array).map(OpenItemDTOFromJSON)), + }; +} + +export function OpenItemDiffDTOToJSON(value?: OpenItemDiffDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'code': value.code, + 'message': value.message, + 'namespace': OpenNamespaceIdentifierToJSON(value.namespace), + 'createItems': value.createItems === undefined ? undefined : ((value.createItems as Array).map(OpenItemDTOToJSON)), + 'deleteItems': value.deleteItems === undefined ? undefined : ((value.deleteItems as Array).map(OpenItemDTOToJSON)), + 'updateItems': value.updateItems === undefined ? undefined : ((value.updateItems as Array).map(OpenItemDTOToJSON)), + }; +} diff --git a/typescript/src/models/OpenItemDiffs.ts b/typescript/src/models/OpenItemDiffs.ts deleted file mode 100644 index 2312914..0000000 --- a/typescript/src/models/OpenItemDiffs.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

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\"
- * - * 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 { exists, mapValues } from '../runtime'; -import type { OpenItemChangeSets } from './OpenItemChangeSets'; -import { - OpenItemChangeSetsFromJSON, - OpenItemChangeSetsFromJSONTyped, - OpenItemChangeSetsToJSON, -} from './OpenItemChangeSets'; -import type { OpenNamespaceIdentifier } from './OpenNamespaceIdentifier'; -import { - OpenNamespaceIdentifierFromJSON, - OpenNamespaceIdentifierFromJSONTyped, - OpenNamespaceIdentifierToJSON, -} from './OpenNamespaceIdentifier'; - -/** - * - * @export - * @interface OpenItemDiffs - */ -export interface OpenItemDiffs { - /** - * - * @type {OpenNamespaceIdentifier} - * @memberof OpenItemDiffs - */ - namespace?: OpenNamespaceIdentifier; - /** - * - * @type {OpenItemChangeSets} - * @memberof OpenItemDiffs - */ - diffs?: OpenItemChangeSets; - /** - * 扩展信息 - * @type {string} - * @memberof OpenItemDiffs - */ - extInfo?: string; -} - -/** - * Check if a given object implements the OpenItemDiffs interface. - */ -export function instanceOfOpenItemDiffs(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenItemDiffsFromJSON(json: any): OpenItemDiffs { - return OpenItemDiffsFromJSONTyped(json, false); -} - -export function OpenItemDiffsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDiffs { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'namespace': !exists(json, 'namespace') ? undefined : OpenNamespaceIdentifierFromJSON(json['namespace']), - 'diffs': !exists(json, 'diffs') ? undefined : OpenItemChangeSetsFromJSON(json['diffs']), - 'extInfo': !exists(json, 'extInfo') ? undefined : json['extInfo'], - }; -} - -export function OpenItemDiffsToJSON(value?: OpenItemDiffs | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'namespace': OpenNamespaceIdentifierToJSON(value.namespace), - 'diffs': OpenItemChangeSetsToJSON(value.diffs), - 'extInfo': value.extInfo, - }; -} diff --git a/typescript/src/models/OpenItemExtendDTO.ts b/typescript/src/models/OpenItemExtendDTO.ts new file mode 100644 index 0000000..28a5ca9 --- /dev/null +++ b/typescript/src/models/OpenItemExtendDTO.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { exists, mapValues } from '../runtime'; +/** + * Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 + * @export + * @interface OpenItemExtendDTO + */ +export interface OpenItemExtendDTO { + /** + * 所属命名空间的ID + * @type {number} + * @memberof OpenItemExtendDTO + */ + namespaceId?: number; + /** + * 是否有未发布的修改 + * @type {boolean} + * @memberof OpenItemExtendDTO + */ + isModified?: boolean; + /** + * 是否被标记为删除(未发布) + * @type {boolean} + * @memberof OpenItemExtendDTO + */ + isDeleted?: boolean; + /** + * 是否为新添加的配置项(未发布) + * @type {boolean} + * @memberof OpenItemExtendDTO + */ + isNewlyAdded?: boolean; + /** + * 新的值 + * @type {string} + * @memberof OpenItemExtendDTO + */ + newValue?: string; + /** + * 上一次发布的值,用于对比变更 + * @type {string} + * @memberof OpenItemExtendDTO + */ + oldValue?: string; +} + +/** + * Check if a given object implements the OpenItemExtendDTO interface. + */ +export function instanceOfOpenItemExtendDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenItemExtendDTOFromJSON(json: any): OpenItemExtendDTO { + return OpenItemExtendDTOFromJSONTyped(json, false); +} + +export function OpenItemExtendDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemExtendDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'namespaceId': !exists(json, 'namespaceId') ? undefined : json['namespaceId'], + 'isModified': !exists(json, 'isModified') ? undefined : json['isModified'], + 'isDeleted': !exists(json, 'isDeleted') ? undefined : json['isDeleted'], + 'isNewlyAdded': !exists(json, 'isNewlyAdded') ? undefined : json['isNewlyAdded'], + 'newValue': !exists(json, 'newValue') ? undefined : json['newValue'], + 'oldValue': !exists(json, 'oldValue') ? undefined : json['oldValue'], + }; +} + +export function OpenItemExtendDTOToJSON(value?: OpenItemExtendDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'namespaceId': value.namespaceId, + 'isModified': value.isModified, + 'isDeleted': value.isDeleted, + 'isNewlyAdded': value.isNewlyAdded, + 'newValue': value.newValue, + 'oldValue': value.oldValue, + }; +} diff --git a/typescript/src/models/OpenNamespaceDTO.ts b/typescript/src/models/OpenNamespaceDTO.ts index 71fbeed..bebc3eb 100644 --- a/typescript/src/models/OpenNamespaceDTO.ts +++ b/typescript/src/models/OpenNamespaceDTO.ts @@ -19,6 +19,12 @@ import { OpenItemDTOFromJSONTyped, OpenItemDTOToJSON, } from './OpenItemDTO'; +import type { OpenNamespaceExtendDTO } from './OpenNamespaceExtendDTO'; +import { + OpenNamespaceExtendDTOFromJSON, + OpenNamespaceExtendDTOFromJSONTyped, + OpenNamespaceExtendDTOToJSON, +} from './OpenNamespaceExtendDTO'; /** * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 @@ -92,6 +98,12 @@ export interface OpenNamespaceDTO { * @memberof OpenNamespaceDTO */ items?: Array; + /** + * + * @type {OpenNamespaceExtendDTO} + * @memberof OpenNamespaceDTO + */ + extendInfo?: OpenNamespaceExtendDTO; } /** @@ -124,6 +136,7 @@ export function OpenNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: bo 'format': !exists(json, 'format') ? undefined : json['format'], 'isPublic': !exists(json, 'isPublic') ? undefined : json['isPublic'], 'items': !exists(json, 'items') ? undefined : ((json['items'] as Array).map(OpenItemDTOFromJSON)), + 'extendInfo': !exists(json, 'extendInfo') ? undefined : OpenNamespaceExtendDTOFromJSON(json['extendInfo']), }; } @@ -147,5 +160,6 @@ export function OpenNamespaceDTOToJSON(value?: OpenNamespaceDTO | null): any { 'format': value.format, 'isPublic': value.isPublic, 'items': value.items === undefined ? undefined : ((value.items as Array).map(OpenItemDTOToJSON)), + 'extendInfo': OpenNamespaceExtendDTOToJSON(value.extendInfo), }; } diff --git a/typescript/src/models/OpenNamespaceExtendDTO.ts b/typescript/src/models/OpenNamespaceExtendDTO.ts new file mode 100644 index 0000000..fcc60c7 --- /dev/null +++ b/typescript/src/models/OpenNamespaceExtendDTO.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface OpenNamespaceExtendDTO + */ +export interface OpenNamespaceExtendDTO { + /** + * 当当前用户无权限查看配置时置为 true + * @type {boolean} + * @memberof OpenNamespaceExtendDTO + */ + isConfigHidden?: boolean; + /** + * 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 + * @type {string} + * @memberof OpenNamespaceExtendDTO + */ + parentAppId?: string; + /** + * 未发布变更数 + * @type {number} + * @memberof OpenNamespaceExtendDTO + */ + itemModifiedCnt?: number; +} + +/** + * Check if a given object implements the OpenNamespaceExtendDTO interface. + */ +export function instanceOfOpenNamespaceExtendDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenNamespaceExtendDTOFromJSON(json: any): OpenNamespaceExtendDTO { + return OpenNamespaceExtendDTOFromJSONTyped(json, false); +} + +export function OpenNamespaceExtendDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceExtendDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'isConfigHidden': !exists(json, 'isConfigHidden') ? undefined : json['isConfigHidden'], + 'parentAppId': !exists(json, 'parentAppId') ? undefined : json['parentAppId'], + 'itemModifiedCnt': !exists(json, 'itemModifiedCnt') ? undefined : json['itemModifiedCnt'], + }; +} + +export function OpenNamespaceExtendDTOToJSON(value?: OpenNamespaceExtendDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'isConfigHidden': value.isConfigHidden, + 'parentAppId': value.parentAppId, + 'itemModifiedCnt': value.itemModifiedCnt, + }; +} diff --git a/typescript/src/models/OpenNamespaceLockDTO.ts b/typescript/src/models/OpenNamespaceLockDTO.ts index cbf021c..229eced 100644 --- a/typescript/src/models/OpenNamespaceLockDTO.ts +++ b/typescript/src/models/OpenNamespaceLockDTO.ts @@ -37,6 +37,12 @@ export interface OpenNamespaceLockDTO { * @memberof OpenNamespaceLockDTO */ lockedBy?: string; + /** + * 是否允许紧急发布 + * @type {boolean} + * @memberof OpenNamespaceLockDTO + */ + isEmergencyPublishAllowed?: boolean; } /** @@ -61,6 +67,7 @@ export function OpenNamespaceLockDTOFromJSONTyped(json: any, ignoreDiscriminator 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], 'isLocked': !exists(json, 'isLocked') ? undefined : json['isLocked'], 'lockedBy': !exists(json, 'lockedBy') ? undefined : json['lockedBy'], + 'isEmergencyPublishAllowed': !exists(json, 'isEmergencyPublishAllowed') ? undefined : json['isEmergencyPublishAllowed'], }; } @@ -76,5 +83,6 @@ export function OpenNamespaceLockDTOToJSON(value?: OpenNamespaceLockDTO | null): 'namespaceName': value.namespaceName, 'isLocked': value.isLocked, 'lockedBy': value.lockedBy, + 'isEmergencyPublishAllowed': value.isEmergencyPublishAllowed, }; } diff --git a/typescript/src/models/OpenNamespaceSyncModel.ts b/typescript/src/models/OpenNamespaceSyncDTO.ts similarity index 78% rename from typescript/src/models/OpenNamespaceSyncModel.ts rename to typescript/src/models/OpenNamespaceSyncDTO.ts index 3ae563b..6d757f8 100644 --- a/typescript/src/models/OpenNamespaceSyncModel.ts +++ b/typescript/src/models/OpenNamespaceSyncDTO.ts @@ -29,37 +29,37 @@ import { /** * * @export - * @interface OpenNamespaceSyncModel + * @interface OpenNamespaceSyncDTO */ -export interface OpenNamespaceSyncModel { +export interface OpenNamespaceSyncDTO { /** * 目标命名空间标识列表 * @type {Array} - * @memberof OpenNamespaceSyncModel + * @memberof OpenNamespaceSyncDTO */ syncToNamespaces?: Array; /** - * 需要同步的配置项列表 + * 需要修改的配置项列表 * @type {Array} - * @memberof OpenNamespaceSyncModel + * @memberof OpenNamespaceSyncDTO */ syncItems?: Array; } /** - * Check if a given object implements the OpenNamespaceSyncModel interface. + * Check if a given object implements the OpenNamespaceSyncDTO interface. */ -export function instanceOfOpenNamespaceSyncModel(value: object): boolean { +export function instanceOfOpenNamespaceSyncDTO(value: object): boolean { let isInstance = true; return isInstance; } -export function OpenNamespaceSyncModelFromJSON(json: any): OpenNamespaceSyncModel { - return OpenNamespaceSyncModelFromJSONTyped(json, false); +export function OpenNamespaceSyncDTOFromJSON(json: any): OpenNamespaceSyncDTO { + return OpenNamespaceSyncDTOFromJSONTyped(json, false); } -export function OpenNamespaceSyncModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceSyncModel { +export function OpenNamespaceSyncDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceSyncDTO { if ((json === undefined) || (json === null)) { return json; } @@ -70,7 +70,7 @@ export function OpenNamespaceSyncModelFromJSONTyped(json: any, ignoreDiscriminat }; } -export function OpenNamespaceSyncModelToJSON(value?: OpenNamespaceSyncModel | null): any { +export function OpenNamespaceSyncDTOToJSON(value?: OpenNamespaceSyncDTO | null): any { if (value === undefined) { return undefined; } diff --git a/typescript/src/models/OpenNamespaceUsageDTO.ts b/typescript/src/models/OpenNamespaceUsageDTO.ts new file mode 100644 index 0000000..d31db62 --- /dev/null +++ b/typescript/src/models/OpenNamespaceUsageDTO.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Apollo OpenAPI + *

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\"
+ * + * 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 { exists, mapValues } from '../runtime'; +/** + * 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 + * @export + * @interface OpenNamespaceUsageDTO + */ +export interface OpenNamespaceUsageDTO { + /** + * 命名空间名称 + * @type {string} + * @memberof OpenNamespaceUsageDTO + */ + namespaceName?: string; + /** + * 所属应用的唯一标识符 + * @type {string} + * @memberof OpenNamespaceUsageDTO + */ + appId?: string; + /** + * 所属集群名称 + * @type {string} + * @memberof OpenNamespaceUsageDTO + */ + clusterName?: string; + /** + * 环境名称 + * @type {string} + * @memberof OpenNamespaceUsageDTO + */ + envName?: string; + /** + * 该命名空间关联的实例数量 + * @type {number} + * @memberof OpenNamespaceUsageDTO + */ + instanceCount?: number; + /** + * 分支命名空间关联的实例数量 + * @type {number} + * @memberof OpenNamespaceUsageDTO + */ + branchInstanceCount?: number; + /** + * 关联到该公共命名空间的命名空间数量 + * @type {number} + * @memberof OpenNamespaceUsageDTO + */ + linkedNamespaceCount?: number; +} + +/** + * Check if a given object implements the OpenNamespaceUsageDTO interface. + */ +export function instanceOfOpenNamespaceUsageDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenNamespaceUsageDTOFromJSON(json: any): OpenNamespaceUsageDTO { + return OpenNamespaceUsageDTOFromJSONTyped(json, false); +} + +export function OpenNamespaceUsageDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceUsageDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], + 'appId': !exists(json, 'appId') ? undefined : json['appId'], + 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], + 'envName': !exists(json, 'envName') ? undefined : json['envName'], + 'instanceCount': !exists(json, 'instanceCount') ? undefined : json['instanceCount'], + 'branchInstanceCount': !exists(json, 'branchInstanceCount') ? undefined : json['branchInstanceCount'], + 'linkedNamespaceCount': !exists(json, 'linkedNamespaceCount') ? undefined : json['linkedNamespaceCount'], + }; +} + +export function OpenNamespaceUsageDTOToJSON(value?: OpenNamespaceUsageDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'namespaceName': value.namespaceName, + 'appId': value.appId, + 'clusterName': value.clusterName, + 'envName': value.envName, + 'instanceCount': value.instanceCount, + 'branchInstanceCount': value.branchInstanceCount, + 'linkedNamespaceCount': value.linkedNamespaceCount, + }; +} diff --git a/typescript/src/models/RichResponseEntity.ts b/typescript/src/models/RichResponseEntity.ts deleted file mode 100644 index eb009a6..0000000 --- a/typescript/src/models/RichResponseEntity.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

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\"
- * - * 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 { exists, mapValues } from '../runtime'; -/** - * A wrapper for a single response entity with code, message, and body - * @export - * @interface RichResponseEntity - */ -export interface RichResponseEntity { - /** - * HTTP status code - * @type {number} - * @memberof RichResponseEntity - */ - code: number; - /** - * Response message (can be string or object) - * @type {object} - * @memberof RichResponseEntity - */ - message: object; - /** - * Response payload (generic type T) - * @type {object} - * @memberof RichResponseEntity - */ - body?: object; -} - -/** - * Check if a given object implements the RichResponseEntity interface. - */ -export function instanceOfRichResponseEntity(value: object): boolean { - let isInstance = true; - isInstance = isInstance && "code" in value; - isInstance = isInstance && "message" in value; - - return isInstance; -} - -export function RichResponseEntityFromJSON(json: any): RichResponseEntity { - return RichResponseEntityFromJSONTyped(json, false); -} - -export function RichResponseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): RichResponseEntity { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': json['code'], - 'message': json['message'], - 'body': !exists(json, 'body') ? undefined : json['body'], - }; -} - -export function RichResponseEntityToJSON(value?: RichResponseEntity | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'message': value.message, - 'body': value.body, - }; -} diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index f40a4bc..c946878 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -2,13 +2,14 @@ /* eslint-disable */ export * from './ExceptionResponse'; export * from './KVEntity'; -export * from './MultiResponseEntity'; export * from './NamespaceGrayDelReleaseDTO'; export * from './NamespaceReleaseDTO'; export * from './OpenAppDTO'; export * from './OpenAppNamespaceDTO'; export * from './OpenClusterDTO'; export * from './OpenCreateAppDTO'; +export * from './OpenCreateItemDTO'; +export * from './OpenCreateNamespaceDTO'; export * from './OpenEnvClusterDTO'; export * from './OpenEnvClusterInfo'; export * from './OpenGrayReleaseRuleDTO'; @@ -18,15 +19,17 @@ export * from './OpenInstanceDTO'; export * from './OpenInstancePageDTO'; export * from './OpenItemChangeSets'; export * from './OpenItemDTO'; -export * from './OpenItemDiffs'; +export * from './OpenItemDiffDTO'; +export * from './OpenItemExtendDTO'; export * from './OpenItemPageDTO'; export * from './OpenMissEnvDTO'; export * from './OpenNamespaceDTO'; +export * from './OpenNamespaceExtendDTO'; export * from './OpenNamespaceIdentifier'; export * from './OpenNamespaceLockDTO'; -export * from './OpenNamespaceSyncModel'; +export * from './OpenNamespaceSyncDTO'; export * from './OpenNamespaceTextModel'; +export * from './OpenNamespaceUsageDTO'; export * from './OpenOrganizationDto'; export * from './OpenReleaseBO'; export * from './OpenReleaseDTO'; -export * from './RichResponseEntity';