From 3c64d04803734d7b94d1d756967a74a94ae5d939 Mon Sep 17 00:00:00 2001 From: tacklequestions Date: Mon, 10 Nov 2025 09:16:37 +0800 Subject: [PATCH] feat: migration of app and instance, fixed some problems --- apollo-openapi.yaml | 471 ++++++++------- java-client/.openapi-generator/FILES | 18 +- java-client/README.md | 21 +- java-client/api/openapi.yaml | 540 ++++++++--------- java-client/docs/AppManagementApi.md | 104 ++-- java-client/docs/ExceptionResponse.md | 13 + java-client/docs/InstanceManagementApi.md | 112 +++- java-client/docs/ItemManagementApi.md | 6 +- java-client/docs/OpenAppDTO.md | 1 + java-client/docs/OpenCreateAppDTO.md | 2 +- java-client/docs/OpenEnvClusterInfo.md | 2 + ...nInstanceDTO.md => OpenInstancePageDTO.md} | 4 +- ...geDTOOpenItemDTO.md => OpenItemPageDTO.md} | 2 +- java-client/docs/OpenMissEnvDTO.md | 11 + .../java/org/openapitools/client/JSON.java | 6 +- .../client/api/AppManagementApi.java | 327 +++++------ .../client/api/ClusterManagementApi.java | 1 + .../client/api/InstanceManagementApi.java | 298 ++++++++-- .../client/api/ItemManagementApi.java | 19 +- .../api/NamespaceBranchManagementApi.java | 1 + .../client/api/NamespaceManagementApi.java | 1 + .../client/api/OrganizationManagementApi.java | 1 + .../client/api/ReleaseManagementApi.java | 1 + .../client/model/ExceptionResponse.java | 295 ++++++++++ .../openapitools/client/model/OpenAppDTO.java | 35 +- .../client/model/OpenCreateAppDTO.java | 14 +- .../client/model/OpenEnvClusterInfo.java | 63 +- ...tanceDTO.java => OpenInstancePageDTO.java} | 108 ++-- ...OOpenItemDTO.java => OpenItemPageDTO.java} | 62 +- .../client/model/OpenMissEnvDTO.java | 235 ++++++++ .../client/api/AppManagementApiTest.java | 46 +- .../client/api/ClusterManagementApiTest.java | 1 + .../client/api/InstanceManagementApiTest.java | 34 +- .../client/api/ItemManagementApiTest.java | 5 +- .../api/NamespaceBranchManagementApiTest.java | 1 + .../api/NamespaceManagementApiTest.java | 1 + .../api/OrganizationManagementApiTest.java | 1 + .../client/api/ReleaseManagementApiTest.java | 1 + .../client/model/ExceptionResponseTest.java | 73 +++ .../client/model/OpenAppDTOTest.java | 8 + .../client/model/OpenCreateAppDTOTest.java | 4 +- .../client/model/OpenEnvClusterInfoTest.java | 16 + ...Test.java => OpenInstancePageDTOTest.java} | 18 +- ...mDTOTest.java => OpenItemPageDTOTest.java} | 12 +- .../client/model/OpenMissEnvDTOTest.java | 56 ++ python/.openapi-generator/FILES | 20 +- python/README.md | 22 +- python/apollo_openapi/apis/path_to_api.py | 25 +- ...openapi_v1_apps_app_id_env_cluster_info.py | 7 + .../paths/openapi_v1_apps_app_id_navtree.py | 7 - ...napi_v1_envs_env_instances_by_namespace.py | 7 + ...tances_by_namespace_and_releases_not_in.py | 7 + ...penapi_v1_envs_env_instances_by_release.py | 7 + ..._envs_env_releases_release_id_instances.py | 7 - .../apis/tags/app_management_api.py | 6 +- .../apis/tags/instance_management_api.py | 8 +- .../model/exception_response.py | 62 +- .../model/exception_response.pyi | 62 +- python/apollo_openapi/model/open_app_dto.py | 14 +- python/apollo_openapi/model/open_app_dto.pyi | 14 +- .../model/open_create_app_dto.py | 1 + .../model/open_env_cluster_info.py | 24 +- .../model/open_env_cluster_info.pyi | 24 +- ...tance_dto.py => open_instance_page_dto.py} | 22 +- ...nce_dto.pyi => open_instance_page_dto.pyi} | 22 +- ...open_item_dto.py => open_item_page_dto.py} | 4 +- ...en_item_dto.pyi => open_item_page_dto.pyi} | 4 +- .../apollo_openapi/model/open_miss_env_dto.py | 88 +++ .../model/open_miss_env_dto.pyi | 88 +++ python/apollo_openapi/models/__init__.py | 5 +- python/apollo_openapi/paths/__init__.py | 9 +- .../paths/openapi_v1_apps/get.py | 38 +- .../paths/openapi_v1_apps/get.pyi | 38 +- .../paths/openapi_v1_apps/post.py | 79 +-- .../paths/openapi_v1_apps/post.pyi | 79 +-- .../paths/openapi_v1_apps_app_id/delete.py | 118 +--- .../paths/openapi_v1_apps_app_id/delete.pyi | 118 +--- .../paths/openapi_v1_apps_app_id/get.py | 38 +- .../paths/openapi_v1_apps_app_id/get.pyi | 38 +- .../paths/openapi_v1_apps_app_id/put.py | 81 +-- .../paths/openapi_v1_apps_app_id/put.pyi | 81 +-- .../post.py | 76 +-- .../post.pyi | 76 +-- .../delete.py | 39 +- .../delete.pyi | 39 +- .../__init__.py | 4 +- .../get.py | 53 +- .../get.pyi | 53 +- .../openapi_v1_apps_app_id_envclusters/get.py | 60 +- .../get.pyi | 60 +- .../delete.py | 39 +- .../delete.pyi | 39 +- .../__init__.py | 2 +- .../openapi_v1_apps_app_id_miss_envs/get.py | 67 +-- .../openapi_v1_apps_app_id_miss_envs/get.pyi | 67 +-- .../paths/openapi_v1_apps_authorized/get.py | 38 +- .../paths/openapi_v1_apps_authorized/get.pyi | 38 +- .../paths/openapi_v1_apps_by_self/get.py | 40 +- .../paths/openapi_v1_apps_by_self/get.pyi | 40 +- .../paths/openapi_v1_apps_envs_env/post.py | 118 +--- .../paths/openapi_v1_apps_envs_env/post.pyi | 118 +--- .../post.py | 76 +-- .../post.pyi | 76 +-- .../delete.py | 153 +---- .../delete.pyi | 153 +---- .../get.py | 38 +- .../get.pyi | 38 +- .../get.py | 38 +- .../get.pyi | 38 +- .../delete.py | 39 +- .../delete.pyi | 39 +- .../get.py | 38 +- .../get.pyi | 38 +- .../post.py | 76 +-- .../post.pyi | 76 +-- .../put.py | 39 +- .../put.pyi | 39 +- .../delete.py | 39 +- .../delete.pyi | 39 +- .../get.py | 38 +- .../get.pyi | 38 +- .../put.py | 153 +---- .../put.pyi | 153 +---- .../get.py | 42 +- .../get.pyi | 42 +- .../post.py | 76 +-- .../post.pyi | 76 +-- .../put.py | 77 +-- .../put.pyi | 77 +-- .../delete.py | 39 +- .../delete.pyi | 39 +- .../get.py | 38 +- .../get.pyi | 38 +- .../put.py | 153 +---- .../put.pyi | 153 +---- .../post.py | 115 +--- .../post.pyi | 115 +--- .../post.py | 115 +--- .../post.pyi | 115 +--- .../post.py | 77 +-- .../post.pyi | 77 +-- .../post.py | 76 +-- .../post.pyi | 76 +-- .../get.py | 38 +- .../get.pyi | 38 +- .../__init__.py | 4 +- .../get.py | 415 ++++++++++++++ .../get.pyi | 401 +++++++++++++ .../__init__.py | 7 + .../get.py | 404 +++++++++++++ .../get.pyi | 396 +++++++++++++ .../__init__.py | 7 + .../get.py | 23 +- .../get.pyi | 23 +- .../put.py | 39 +- .../put.pyi | 39 +- .../paths/openapi_v1_organizations/get.py | 38 +- .../paths/openapi_v1_organizations/get.pyi | 38 +- python/docs/apis/tags/AppManagementApi.md | 496 ++++++++-------- python/docs/apis/tags/ClusterManagementApi.md | 91 +-- .../docs/apis/tags/InstanceManagementApi.md | 277 +++++++-- python/docs/apis/tags/ItemManagementApi.md | 344 ++--------- .../apis/tags/NamespaceBranchManagementApi.md | 39 +- .../docs/apis/tags/NamespaceManagementApi.md | 52 +- .../apis/tags/OrganizationManagementApi.md | 13 +- python/docs/apis/tags/ReleaseManagementApi.md | 78 +-- python/docs/models/ExceptionResponse.md | 10 +- python/docs/models/OpenAppDTO.md | 1 + python/docs/models/OpenEnvClusterInfo.md | 2 + ...nInstanceDTO.md => OpenInstancePageDTO.md} | 6 +- ...geDTOOpenItemDTO.md => OpenItemPageDTO.md} | 2 +- python/docs/models/OpenMissEnvDTO.md | 15 + ..._dto.py => test_open_instance_page_dto.py} | 6 +- ...ance_dto.py => test_open_item_page_dto.py} | 6 +- .../test_models/test_open_miss_env_dto.py | 25 + .../__init__.py | 0 .../test_get.py | 8 +- .../test_openapi_v1_apps_by_self/test_get.py | 2 +- .../__init__.py | 0 .../test_get.py | 41 ++ .../__init__.py | 1 + .../test_get.py | 41 ++ .../__init__.py | 1 + .../test_get.py | 6 +- rust/.openapi-generator/FILES | 12 +- rust/README.md | 6 +- rust/docs/ExceptionResponse.md | 12 + rust/docs/OpenAppDto.md | 1 + rust/docs/OpenEnvClusterInfo.md | 2 + ...nInstanceDto.md => OpenInstancePageDto.md} | 4 +- ...geDtoOpenItemDto.md => OpenItemPageDto.md} | 2 +- rust/docs/OpenMissEnvDto.md | 10 + rust/src/models/exception_response.rs | 39 ++ rust/src/models/mod.rs | 12 +- rust/src/models/open_app_dto.rs | 3 + rust/src/models/open_env_cluster_info.rs | 8 + ...tance_dto.rs => open_instance_page_dto.rs} | 16 +- ...open_item_dto.rs => open_item_page_dto.rs} | 10 +- rust/src/models/open_miss_env_dto.rs | 30 + spring-boot2/.openapi-generator/FILES | 6 +- .../openapi/server/api/AppManagementApi.java | 145 ++--- .../api/AppManagementApiController.java | 5 +- .../server/api/AppManagementApiDelegate.java | 95 +-- .../server/api/ClusterManagementApi.java | 14 +- .../api/ClusterManagementApiController.java | 2 +- .../api/ClusterManagementApiDelegate.java | 6 +- .../server/api/InstanceManagementApi.java | 81 ++- .../api/InstanceManagementApiController.java | 2 +- .../api/InstanceManagementApiDelegate.java | 56 +- .../openapi/server/api/ItemManagementApi.java | 44 +- .../api/ItemManagementApiController.java | 4 +- .../server/api/ItemManagementApiDelegate.java | 6 +- .../api/NamespaceBranchManagementApi.java | 4 +- ...amespaceBranchManagementApiController.java | 2 +- .../NamespaceBranchManagementApiDelegate.java | 2 +- .../server/api/NamespaceManagementApi.java | 6 +- .../api/NamespaceManagementApiController.java | 2 +- .../api/NamespaceManagementApiDelegate.java | 2 +- .../server/api/OrganizationManagementApi.java | 4 +- .../OrganizationManagementApiController.java | 2 +- .../OrganizationManagementApiDelegate.java | 2 +- .../server/api/ReleaseManagementApi.java | 12 +- .../api/ReleaseManagementApiController.java | 2 +- .../api/ReleaseManagementApiDelegate.java | 2 +- .../server/model/ExceptionResponse.java | 157 +++++ .../openapi/server/model/OpenAppDTO.java | 28 +- .../server/model/OpenCreateAppDTO.java | 16 +- .../server/model/OpenEnvClusterInfo.java | 52 +- ...tanceDTO.java => OpenInstancePageDTO.java} | 54 +- ...OOpenItemDTO.java => OpenItemPageDTO.java} | 26 +- .../openapi/server/model/OpenMissEnvDTO.java | 106 ++++ spring-boot2/src/main/resources/openapi.yaml | 542 +++++++++--------- typescript/.openapi-generator/FILES | 6 +- typescript/src/apis/AppManagementApi.ts | 142 +++-- typescript/src/apis/ClusterManagementApi.ts | 3 + typescript/src/apis/InstanceManagementApi.ts | 148 ++++- typescript/src/apis/ItemManagementApi.ts | 15 +- .../src/apis/NamespaceBranchManagementApi.ts | 3 + typescript/src/apis/NamespaceManagementApi.ts | 3 + .../src/apis/OrganizationManagementApi.ts | 3 + typescript/src/apis/ReleaseManagementApi.ts | 3 + typescript/src/models/ExceptionResponse.ts | 88 +++ typescript/src/models/OpenAppDTO.ts | 8 + typescript/src/models/OpenCreateAppDTO.ts | 6 +- typescript/src/models/OpenEnvClusterInfo.ts | 16 + ...nInstanceDTO.ts => OpenInstancePageDTO.ts} | 30 +- ...geDTOOpenItemDTO.ts => OpenItemPageDTO.ts} | 24 +- typescript/src/models/OpenMissEnvDTO.ts | 72 +++ typescript/src/models/index.ts | 6 +- 249 files changed, 6765 insertions(+), 7401 deletions(-) create mode 100644 java-client/docs/ExceptionResponse.md rename java-client/docs/{OpenPageDTOOpenInstanceDTO.md => OpenInstancePageDTO.md} (71%) rename java-client/docs/{OpenPageDTOOpenItemDTO.md => OpenItemPageDTO.md} (95%) create mode 100644 java-client/docs/OpenMissEnvDTO.md create mode 100644 java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java rename java-client/src/main/java/org/openapitools/client/model/{OpenPageDTOOpenInstanceDTO.java => OpenInstancePageDTO.java} (65%) rename java-client/src/main/java/org/openapitools/client/model/{OpenPageDTOOpenItemDTO.java => OpenItemPageDTO.java} (78%) create mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java create mode 100644 java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java rename java-client/src/test/java/org/openapitools/client/model/{OpenPageDTOOpenInstanceDTOTest.java => OpenInstancePageDTOTest.java} (81%) rename java-client/src/test/java/org/openapitools/client/model/{OpenPageDTOOpenItemDTOTest.java => OpenItemPageDTOTest.java} (86%) create mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_navtree.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py create mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_instances.py rename python/apollo_openapi/model/{open_page_dto_open_instance_dto.py => open_instance_page_dto.py} (87%) rename python/apollo_openapi/model/{open_page_dto_open_instance_dto.pyi => open_instance_page_dto.pyi} (87%) rename python/apollo_openapi/model/{open_page_dto_open_item_dto.py => open_item_page_dto.py} (98%) rename python/apollo_openapi/model/{open_page_dto_open_item_dto.pyi => open_item_page_dto.pyi} (98%) create mode 100644 python/apollo_openapi/model/open_miss_env_dto.py create mode 100644 python/apollo_openapi/model/open_miss_env_dto.pyi rename python/apollo_openapi/paths/{openapi_v1_apps_app_id_navtree => openapi_v1_apps_app_id_env_cluster_info}/__init__.py (62%) rename python/apollo_openapi/paths/{openapi_v1_apps_app_id_navtree => openapi_v1_apps_app_id_env_cluster_info}/get.py (88%) rename python/apollo_openapi/paths/{openapi_v1_apps_app_id_navtree => openapi_v1_apps_app_id_env_cluster_info}/get.pyi (88%) rename python/apollo_openapi/paths/{openapi_v1_envs_env_releases_release_id_instances => openapi_v1_envs_env_instances_by_namespace}/__init__.py (59%) create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi create mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__init__.py rename python/apollo_openapi/paths/{openapi_v1_envs_env_releases_release_id_instances => openapi_v1_envs_env_instances_by_release}/get.py (97%) rename python/apollo_openapi/paths/{openapi_v1_envs_env_releases_release_id_instances => openapi_v1_envs_env_instances_by_release}/get.pyi (97%) rename python/docs/models/{OpenPageDTOOpenInstanceDTO.md => OpenInstancePageDTO.md} (90%) rename python/docs/models/{OpenPageDTOOpenItemDTO.md => OpenItemPageDTO.md} (96%) create mode 100644 python/docs/models/OpenMissEnvDTO.md rename python/test/test_models/{test_open_page_dto_open_item_dto.py => test_open_instance_page_dto.py} (84%) rename python/test/test_models/{test_open_page_dto_open_instance_dto.py => test_open_item_page_dto.py} (83%) create mode 100644 python/test/test_models/test_open_miss_env_dto.py rename python/test/test_paths/{test_openapi_v1_apps_app_id_navtree => test_openapi_v1_apps_app_id_env_cluster_info}/__init__.py (100%) rename python/test/test_paths/{test_openapi_v1_apps_app_id_navtree => test_openapi_v1_apps_app_id_env_cluster_info}/test_get.py (68%) rename python/test/test_paths/{test_openapi_v1_envs_env_releases_release_id_instances => test_openapi_v1_envs_env_instances_by_namespace}/__init__.py (100%) create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/test_get.py create mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py rename python/test/test_paths/{test_openapi_v1_envs_env_releases_release_id_instances => test_openapi_v1_envs_env_instances_by_release}/test_get.py (73%) create mode 100644 rust/docs/ExceptionResponse.md rename rust/docs/{OpenPageDtoOpenInstanceDto.md => OpenInstancePageDto.md} (73%) rename rust/docs/{OpenPageDtoOpenItemDto.md => OpenItemPageDto.md} (96%) create mode 100644 rust/docs/OpenMissEnvDto.md create mode 100644 rust/src/models/exception_response.rs rename rust/src/models/{open_page_dto_open_instance_dto.rs => open_instance_page_dto.rs} (78%) rename rust/src/models/{open_page_dto_open_item_dto.rs => open_item_page_dto.rs} (87%) create mode 100644 rust/src/models/open_miss_env_dto.rs create mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{OpenPageDTOOpenInstanceDTO.java => OpenInstancePageDTO.java} (64%) rename spring-boot2/src/main/java/com/apollo/openapi/server/model/{OpenPageDTOOpenItemDTO.java => OpenItemPageDTO.java} (80%) create mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java create mode 100644 typescript/src/models/ExceptionResponse.ts rename typescript/src/models/{OpenPageDTOOpenInstanceDTO.ts => OpenInstancePageDTO.ts} (68%) rename typescript/src/models/{OpenPageDTOOpenItemDTO.ts => OpenItemPageDTO.ts} (77%) create mode 100644 typescript/src/models/OpenMissEnvDTO.ts diff --git a/apollo-openapi.yaml b/apollo-openapi.yaml index 7fba16d..3937aa2 100644 --- a/apollo-openapi.yaml +++ b/apollo-openapi.yaml @@ -61,24 +61,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/OpenAppDTO' headers: {} '400': description: '请求参数错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' # This is to avoid openapi-generator generating completely different error responses for each error + $ref: '#/components/schemas/ExceptionResponse' # This is to avoid openapi-generator generating completely different error responses for each error '403': description: 权限不足 content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' get: summary: 查找应用 (original openapi) operationId: findApps @@ -130,9 +126,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/apps/authorized: get: summary: 获取当前Consumer授权的应用列表 (original openapi) @@ -177,13 +171,11 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/apps/{appId}/envclusters: get: summary: 获取应用的环境集群信息 (original openapi) - operationId: getEnvClusterInfo + operationId: getEnvClusters deprecated: false description: GET /openapi/v1/apps/{appId}/envclusters tags: @@ -222,9 +214,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/apps/{appId}: get: summary: 获取单个应用信息(new added) # which means this is a new added openapi endpoint @@ -264,9 +254,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' put: summary: 更新应用(new added) operationId: updateApp @@ -284,7 +272,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string requestBody: @@ -299,35 +287,20 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenAppDTO' - example: - dataChangeCreatedBy: 'apollo' - dataChangeLastModifiedBy: 'dev-user' - dataChangeCreatedTime: '2024-01-15T10:30:00.000Z' - dataChangeLastModifiedTime: '2024-01-20T16:45:00.000Z' - name: 'Updated Sample Application' - appId: 'sample-app' - orgId: 'default' - orgName: 'Default Organization' - ownerName: 'Apollo Admin' - ownerEmail: 'admin@apollo.com' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} '400': description: '请求参数错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' delete: summary: 删除应用(new added) operationId: deleteApp @@ -345,7 +318,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string responses: @@ -354,29 +327,23 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '403': description: '权限不足,需要超级管理员权限' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '404': description: '应用不存在' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/apps/by-self: get: - summary: 获取当前Consumer的应用列表(分页)(new added) + summary: 获取当前Consumer/User的应用列表(分页)(new added) operationId: getAppsBySelf deprecated: false description: GET /openapi/v1/apps/by-self @@ -433,15 +400,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - /openapi/v1/apps/{appId}/navtree: + $ref: '#/components/schemas/ExceptionResponse' + /openapi/v1/apps/{appId}/env-cluster-info: get: - summary: 获取应用导航树(new added) - operationId: getAppNavTree + summary: 获取应用环境集群详情(new added) + operationId: getEnvClusterInfo deprecated: false - description: GET /openapi/v1/apps/{appId}/navtree + description: /openapi/v1/apps/{appId}/env-cluster-info tags: - App Management parameters: @@ -453,13 +418,16 @@ paths: type: string responses: '200': - description: '成功获取应用导航树' + description: '成功获取应用环境集群详情' content: application/json: schema: - $ref: '#/components/schemas/MultiResponseEntity' + type: array + items: + $ref: '#/components/schemas/OpenEnvClusterInfo' example: - env: 'DEV' + code: '200' clusters: - dataChangeCreatedBy: 'apollo' dataChangeLastModifiedBy: 'apollo' @@ -472,6 +440,7 @@ paths: appId: 'sample-app' parentClusterId: 0 comment: 'Default cluster' + message: 'load env: DEV cluster error' headers: {} /openapi/v1/apps/envs/{env}: post: @@ -491,7 +460,7 @@ paths: - name: operator in: query description: '操作人用户名' - required: true + required: false schema: type: string requestBody: @@ -506,32 +475,26 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} - /openapi/v1/apps/{appId}/miss_envs: + /openapi/v1/apps/{appId}/miss-envs: get: summary: 查找缺失的环境(new added) operationId: findMissEnvs deprecated: false - description: GET /openapi/v1/apps/{appId}/miss_envs + description: GET /openapi/v1/apps/{appId}/miss-envs tags: - App Management parameters: @@ -543,20 +506,24 @@ paths: type: string responses: '200': - description: '成功获取应用缺失的环境列表' + description: 成功获取应用缺失的环境列表 content: application/json: schema: - $ref: '#/components/schemas/MultiResponseEntity' - headers: {} + type: array + items: + $ref: '#/components/schemas/OpenMissEnvDTO' + example: + - code: "200" + message: "test_NOT_FOUND" + - code: "500" + message: "load appId:xx from env test_INTERNAL_ERROR error. test ERROR MESSAGE" '404': description: '应用不存在' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: get: summary: 获取单个配置项 (original openapi) @@ -618,9 +585,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' put: summary: 更新配置项 (original openapi) operationId: updateItem @@ -679,33 +644,25 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '404': description: '配置项不存在' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} delete: summary: 删除配置项 (original openapi) @@ -757,9 +714,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: get: @@ -816,7 +771,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' + $ref: '#/components/schemas/OpenItemPageDTO' example: page: 0 size: 50 @@ -852,9 +807,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' post: summary: 创建新的配置项 (original openapi) operationId: createItem @@ -921,17 +874,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: get: summary: 通过查询参数获取配置项(支持编码的key) (original openapi) @@ -993,9 +942,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' put: summary: 通过编码的key更新配置项 (original openapi) operationId: updateItemByEncodedKey @@ -1054,33 +1001,25 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: 请求参数错误 content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '404': description: '配置项不存在' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} delete: summary: 通过编码的key删除配置项 (original openapi) @@ -1132,9 +1071,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/batchUpdate: put: @@ -1189,17 +1126,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: get: @@ -1274,9 +1207,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/compare: post: summary: 对比命名空间配置差异 (new added) @@ -1437,25 +1368,19 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validate: post: @@ -1504,17 +1429,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '配置文本语法错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revert: post: @@ -1563,25 +1484,19 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '请求参数错误' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: get: @@ -1630,9 +1545,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' delete: summary: 删除集群 (new added) operationId: deleteCluster @@ -1671,33 +1584,25 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' '400': description: '删除失败,集群可能包含配置' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '404': description: '集群不存在' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' headers: {} /openapi/v1/envs/{env}/apps/{appId}/clusters: post: @@ -1745,17 +1650,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: 权限不足 content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: post: summary: 创建发布 (original openapi) @@ -1823,17 +1724,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: get: summary: 获取最新活跃发布 (original openapi) @@ -1896,9 +1793,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: post: summary: 合并分支 (original openapi) @@ -1980,17 +1875,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: post: summary: 创建灰度发布 (original openapi) @@ -2157,9 +2048,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/envs/{env}/releases/{releaseId}: get: @@ -2394,12 +2283,12 @@ paths: schema: type: integer headers: {} - /openapi/v1/envs/{env}/releases/{releaseId}/instances: + /openapi/v1/envs/{env}/instances/by-release: get: summary: 根据发布版本查询实例(支持分页) (new added) operationId: getByRelease deprecated: false - description: GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + description: GET /openapi/v1/envs/{env}/instances/by-release tags: - Instance Management parameters: @@ -2410,11 +2299,12 @@ paths: schema: type: string - name: releaseId - in: path + in: query description: '' required: true schema: type: integer + format: int64 - name: page in: query description: '' @@ -2435,12 +2325,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/OpenPageDTOOpenInstanceDTO' + $ref: '#/components/schemas/OpenInstancePageDTO' example: page: 0 size: 0 total: 0 - content: + instances: - id: 0 appId: '' clusterName: '' @@ -2464,14 +2354,11 @@ paths: dataChangeLastModifiedTime: '' dataChangeCreatedTime: '' headers: {} - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: # avoidng confliction with other server endpoint + /openapi/v1/envs/{env}/instances/by-namespace: get: - summary: 查询不在指定发布版本中的实例 (new added) - operationId: getByReleasesNotIn + summary: 根据namespaceName查询实例(new added) + operationId: getByNamespace deprecated: false - description: >- - GET - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 tags: - Instance Management parameters: @@ -2482,24 +2369,113 @@ paths: schema: type: string - name: appId - in: path + in: query description: '应用ID' required: true schema: type: string - name: clusterName - in: path + in: query description: '集群名称' required: true schema: type: string - name: namespaceName + in: query + description: '命名空间名称' + required: true + schema: + type: string + - name: instanceAppId + in: query + required: false + description: 'Instance表中的AppID' + schema: + type: string + - name: page + in: query + description: '页数' + required: true + schema: + type: integer + default: 0 + minimum: 0 + - name: size + in: query + description: '页大小' + required: true + schema: + type: integer + default: 0 + minimum: 0 + responses: + '200': + description: '' + content: + application/json: + schema: + $ref: '#/components/schemas/OpenInstancePageDTO' + example: + page: 0 + size: 0 + total: 0 + instances: + - id: 0 + appId: '' + clusterName: '' + dataCenter: '' + ip: '' + configs: + - release: + dataChangeCreatedBy: '' + dataChangeLastModifiedBy: '' + dataChangeCreatedTime: '' + dataChangeLastModifiedTime: '' + id: 0 + appId: '' + clusterName: '' + namespaceName: '' + name: '' + configurations: + '': '' + comment: '' + releaseDeliveryTime: '' + dataChangeLastModifiedTime: '' + dataChangeCreatedTime: '' + headers: {} + /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in: # avoidng confliction with other server endpoint + get: + summary: 查询不在指定发布版本中的实例 (new added) + operationId: getByReleasesAndNamespaceNotIn + deprecated: false + tags: + - Instance Management + parameters: + - name: env in: path + description: '环境标识' + required: true + schema: + type: string + - name: appId + in: query + description: '应用ID' + required: true + schema: + type: string + - name: clusterName + in: query + description: '集群名称' + required: true + schema: + type: string + - name: namespaceName + in: query description: '命名空间名称' required: true schema: type: string - - name: excludeReleases + - name: releaseIds in: query description: '排除的发布ID列表,用逗号分隔' required: false @@ -2583,17 +2559,13 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' '403': description: '权限不足' content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' get: summary: 获取指定应用的AppNamespace (new added) operationId: getAppNamespacesByApp @@ -2917,9 +2889,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/apps/{appId}/namespaces/releases/status: get: @@ -3160,9 +3130,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/organizations: get: @@ -3195,9 +3163,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: get: summary: 获取命名空间分支信息 (original openapi) @@ -3272,9 +3238,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/ExceptionResponse' + $ref: '#/components/schemas/ExceptionResponse' post: summary: 创建命名空间分支 (original openapi) deprecated: false @@ -3392,9 +3356,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} patch: summary: 合并分支到主分支 (new added) @@ -3597,9 +3559,7 @@ paths: content: application/json: schema: - type: object - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/SuccessEmptyResponse' headers: {} /openapi/v1/envs: get: @@ -3680,6 +3640,8 @@ components: ownerEmail: type: string description: 应用负责人邮箱地址,用于接收应用相关通知 + ownerDisplayName: + type: string description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 OpenCreateAppDTO: type: object @@ -3691,6 +3653,7 @@ components: type: array items: type: string + uniqueItems: true description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 app: $ref: '#/components/schemas/OpenAppDTO' @@ -3725,7 +3688,7 @@ components: type: string description: 配置项的注释说明,用于描述配置项的用途和含义 description: Apollo配置项数据传输对象,表示一个具体的配置键值对及其元数据 - OpenPageDTOOpenItemDTO: + OpenItemPageDTO: type: object properties: page: @@ -4002,7 +3965,7 @@ components: type: string description: 锁定者用户名 description: Apollo命名空间锁状态数据传输对象 - OpenPageDTOOpenInstanceDTO: + OpenInstancePageDTO: type: object properties: page: @@ -4015,7 +3978,7 @@ components: type: integer description: 总记录数,符合查询条件的实例总数量 format: int64 - content: + instances: type: array items: $ref: '#/components/schemas/OpenInstanceDTO' @@ -4035,6 +3998,12 @@ components: OpenEnvClusterInfo: type: object properties: + code: + type: integer + description: 查询状态码 + message: + type: string + description: '相关信息' env: type: string description: '环境标识' @@ -4043,6 +4012,14 @@ components: items: $ref: '#/components/schemas/OpenClusterDTO' description: '集群信息列表' + OpenMissEnvDTO: + type: object + properties: + code: + type: integer + description: 查询状态码 + message: + type: string OpenNamespaceTextModel: type: object properties: @@ -4220,14 +4197,20 @@ components: description: 组织名称 ExceptionResponse: type: object - additionalProperties: true # 对应 server 中 GlobalExceptionHandler返回Map - description: > - 错误响应对象,表示为 Map。 - 字段包括: - - status: HTTP 状态码 (integer) - - message: 错误信息 (string) - - timestamp: 出错时间戳 (string) - - exception: 异常类名或标识 (string) + properties: + status: + type: integer + description: HTTP 状态码 + message: + type: string + description: 错误信息 + timestamp: + type: string + format: date-time + description: 时间戳 + exception: + type: string + description: 错误类名 example: status: 404 message: "Resource not found" diff --git a/java-client/.openapi-generator/FILES b/java-client/.openapi-generator/FILES index cd19a45..7579cbe 100644 --- a/java-client/.openapi-generator/FILES +++ b/java-client/.openapi-generator/FILES @@ -9,6 +9,7 @@ build.sbt docs/AppManagementApi.md docs/ClusterManagementApi.md docs/EnvironmentManagementApi.md +docs/ExceptionResponse.md docs/InstanceManagementApi.md docs/ItemManagementApi.md docs/KVEntity.md @@ -27,17 +28,18 @@ docs/OpenGrayReleaseRuleDTO.md docs/OpenGrayReleaseRuleItemDTO.md docs/OpenInstanceConfigDTO.md docs/OpenInstanceDTO.md +docs/OpenInstancePageDTO.md docs/OpenItemChangeSets.md docs/OpenItemDTO.md docs/OpenItemDiffs.md +docs/OpenItemPageDTO.md +docs/OpenMissEnvDTO.md docs/OpenNamespaceDTO.md docs/OpenNamespaceIdentifier.md docs/OpenNamespaceLockDTO.md docs/OpenNamespaceSyncModel.md docs/OpenNamespaceTextModel.md docs/OpenOrganizationDto.md -docs/OpenPageDTOOpenInstanceDTO.md -docs/OpenPageDTOOpenItemDTO.md docs/OpenReleaseBO.md docs/OpenReleaseDTO.md docs/OrganizationManagementApi.md @@ -79,6 +81,7 @@ src/main/java/org/openapitools/client/auth/Authentication.java src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +src/main/java/org/openapitools/client/model/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 @@ -93,17 +96,18 @@ src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java src/main/java/org/openapitools/client/model/OpenInstanceDTO.java +src/main/java/org/openapitools/client/model/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/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/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/OpenNamespaceTextModel.java src/main/java/org/openapitools/client/model/OpenOrganizationDto.java -src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java -src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java src/main/java/org/openapitools/client/model/OpenReleaseBO.java src/main/java/org/openapitools/client/model/OpenReleaseDTO.java src/main/java/org/openapitools/client/model/RichResponseEntity.java @@ -116,6 +120,7 @@ src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java +src/test/java/org/openapitools/client/model/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 @@ -130,17 +135,18 @@ src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java +src/test/java/org/openapitools/client/model/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/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/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/OpenNamespaceTextModelTest.java src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java -src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java -src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java src/test/java/org/openapitools/client/model/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 01e71d3..d9e5490 100644 --- a/java-client/README.md +++ b/java-client/README.md @@ -115,7 +115,7 @@ public class Example { AppManagementApi apiInstance = new AppManagementApi(defaultClient); OpenCreateAppDTO openCreateAppDTO = new OpenCreateAppDTO(); // OpenCreateAppDTO | try { - Object result = apiInstance.createApp(openCreateAppDTO); + OpenAppDTO result = apiInstance.createApp(openCreateAppDTO); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppManagementApi#createApp"); @@ -140,18 +140,19 @@ Class | Method | HTTP request | Description *AppManagementApi* | [**deleteApp**](docs/AppManagementApi.md#deleteApp) | **DELETE** /openapi/v1/apps/{appId} | 删除应用(new added) *AppManagementApi* | [**findApps**](docs/AppManagementApi.md#findApps) | **GET** /openapi/v1/apps | 查找应用 (original openapi) *AppManagementApi* | [**findAppsAuthorized**](docs/AppManagementApi.md#findAppsAuthorized) | **GET** /openapi/v1/apps/authorized | 获取当前Consumer授权的应用列表 (original openapi) -*AppManagementApi* | [**findMissEnvs**](docs/AppManagementApi.md#findMissEnvs) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境(new added) +*AppManagementApi* | [**findMissEnvs**](docs/AppManagementApi.md#findMissEnvs) | **GET** /openapi/v1/apps/{appId}/miss-envs | 查找缺失的环境(new added) *AppManagementApi* | [**getApp**](docs/AppManagementApi.md#getApp) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息(new added) -*AppManagementApi* | [**getAppNavTree**](docs/AppManagementApi.md#getAppNavTree) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树(new added) -*AppManagementApi* | [**getAppsBySelf**](docs/AppManagementApi.md#getAppsBySelf) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页)(new added) -*AppManagementApi* | [**getEnvClusterInfo**](docs/AppManagementApi.md#getEnvClusterInfo) | **GET** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) +*AppManagementApi* | [**getAppsBySelf**](docs/AppManagementApi.md#getAppsBySelf) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) +*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) *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) *EnvironmentManagementApi* | [**getEnvs**](docs/EnvironmentManagementApi.md#getEnvs) | **GET** /openapi/v1/envs | 获取所有环境 -*InstanceManagementApi* | [**getByRelease**](docs/InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) -*InstanceManagementApi* | [**getByReleasesNotIn**](docs/InstanceManagementApi.md#getByReleasesNotIn) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) +*InstanceManagementApi* | [**getByNamespace**](docs/InstanceManagementApi.md#getByNamespace) | **GET** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) +*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) @@ -200,6 +201,7 @@ Class | Method | HTTP request | Description ## Documentation for Models + - [ExceptionResponse](docs/ExceptionResponse.md) - [KVEntity](docs/KVEntity.md) - [MultiResponseEntity](docs/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) @@ -214,17 +216,18 @@ Class | Method | HTTP request | Description - [OpenGrayReleaseRuleItemDTO](docs/OpenGrayReleaseRuleItemDTO.md) - [OpenInstanceConfigDTO](docs/OpenInstanceConfigDTO.md) - [OpenInstanceDTO](docs/OpenInstanceDTO.md) + - [OpenInstancePageDTO](docs/OpenInstancePageDTO.md) - [OpenItemChangeSets](docs/OpenItemChangeSets.md) - [OpenItemDTO](docs/OpenItemDTO.md) - [OpenItemDiffs](docs/OpenItemDiffs.md) + - [OpenItemPageDTO](docs/OpenItemPageDTO.md) + - [OpenMissEnvDTO](docs/OpenMissEnvDTO.md) - [OpenNamespaceDTO](docs/OpenNamespaceDTO.md) - [OpenNamespaceIdentifier](docs/OpenNamespaceIdentifier.md) - [OpenNamespaceLockDTO](docs/OpenNamespaceLockDTO.md) - [OpenNamespaceSyncModel](docs/OpenNamespaceSyncModel.md) - [OpenNamespaceTextModel](docs/OpenNamespaceTextModel.md) - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPageDTOOpenInstanceDTO](docs/OpenPageDTOOpenInstanceDTO.md) - - [OpenPageDTOOpenItemDTO](docs/OpenPageDTOOpenItemDTO.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 b0d9905..ed0706c 100644 --- a/java-client/api/openapi.yaml +++ b/java-client/api/openapi.yaml @@ -91,9 +91,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 summary: 查找应用 (original openapi) tags: @@ -114,23 +112,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/OpenAppDTO' description: 应用创建成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建应用 (original openapi) tags: @@ -176,9 +170,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 summary: 获取当前Consumer授权的应用列表 (original openapi) tags: @@ -187,8 +179,8 @@ paths: /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envclusters" - operationId: getEnvClusterInfo + description: "GET /openapi/v1/apps/{appId}/envClusters" + operationId: getEnvClusters parameters: - description: 应用ID explode: false @@ -223,9 +215,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 获取应用的环境集群信息 (original openapi) tags: @@ -249,7 +239,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -258,25 +248,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 应用删除成功 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足,需要超级管理员权限 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 删除应用(new added) tags: @@ -317,9 +301,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 获取单个应用信息(new added) tags: @@ -342,7 +324,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -356,35 +338,20 @@ paths: "200": content: application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T16:45:00.000Z - name: Updated Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com schema: - $ref: '#/components/schemas/OpenAppDTO' + $ref: '#/components/schemas/SuccessEmptyResponse' description: 应用更新成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 更新应用(new added) tags: @@ -449,19 +416,17 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 - summary: 获取当前Consumer的应用列表(分页)(new added) + summary: 获取当前Consumer/User的应用列表(分页)(new added) tags: - App Management x-accepts: application/json - /openapi/v1/apps/{appId}/navtree: + /openapi/v1/apps/{appId}/env-cluster-info: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/navtree" - operationId: getAppNavTree + description: "/openapi/v1/apps/{appId}/env-cluster-info" + operationId: getEnvClusterInfo parameters: - description: 应用ID explode: false @@ -477,6 +442,7 @@ paths: application/json: example: - env: DEV + code: "200" clusters: - dataChangeCreatedBy: apollo dataChangeLastModifiedBy: apollo @@ -489,10 +455,13 @@ paths: appId: sample-app parentClusterId: 0 comment: Default cluster + message: "load env: DEV cluster error" schema: - $ref: '#/components/schemas/MultiResponseEntity' - description: 成功获取应用导航树 - summary: 获取应用导航树(new added) + items: + $ref: '#/components/schemas/OpenEnvClusterInfo' + type: array + description: 成功获取应用环境集群详情 + summary: 获取应用环境集群详情(new added) tags: - App Management x-accepts: application/json @@ -514,7 +483,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -529,35 +498,29 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 应用在指定环境创建成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 在指定环境创建应用(new added) tags: - App Management x-content-type: application/json x-accepts: application/json - /openapi/v1/apps/{appId}/miss_envs: + /openapi/v1/apps/{appId}/miss-envs: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/miss_envs" + description: "GET /openapi/v1/apps/{appId}/miss-envs" operationId: findMissEnvs parameters: - description: 应用ID @@ -572,16 +535,22 @@ paths: "200": content: application/json: + example: + - code: "200" + message: test_NOT_FOUND + - code: "500" + message: load appId:xx from env test_INTERNAL_ERROR error. test ERROR + MESSAGE schema: - $ref: '#/components/schemas/MultiResponseEntity' + items: + $ref: '#/components/schemas/OpenMissEnvDTO' + type: array description: 成功获取应用缺失的环境列表 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 查找缺失的环境(new added) tags: @@ -646,9 +615,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项删除成功 summary: 删除配置项 (original openapi) tags: @@ -719,9 +686,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 获取单个配置项 (original openapi) tags: @@ -793,33 +758,25 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 更新配置项 (original openapi) tags: @@ -918,15 +875,13 @@ paths: value: INFO comment: 日志级别配置 schema: - $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' + $ref: '#/components/schemas/OpenItemPageDTO' description: 成功获取配置项列表 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 命名空间不存在 summary: 获取命名空间下的配置项列表 (original openapi) tags: @@ -1003,17 +958,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建新的配置项 (original openapi) tags: @@ -1079,9 +1030,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: "" summary: 通过编码的key删除配置项 (original openapi) tags: @@ -1152,9 +1101,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 通过查询参数获取配置项(支持编码的key) (original openapi) tags: @@ -1226,33 +1173,25 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功(编码key) "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 通过编码的key更新配置项 (original openapi) tags: @@ -1316,17 +1255,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 批量更新配置项成功 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 通过文本批量修改配置项 (new added) tags: @@ -1409,9 +1344,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 分支不存在 summary: 获取分支下的配置项 (new added) tags: @@ -1588,25 +1521,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项同步成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 同步配置项到多个命名空间 (new added) tags: @@ -1662,17 +1589,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置文本语法验证通过 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置文本语法错误 summary: 验证配置文本语法 (new added) tags: @@ -1730,25 +1653,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更改撤销成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 撤销配置项更改 (new added) tags: @@ -1797,33 +1714,25 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 集群删除成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 删除失败,集群可能包含配置 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 集群不存在 summary: 删除集群 (new added) tags: @@ -1876,9 +1785,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 集群不存在 summary: 获取指定集群信息 (original openapi) tags: @@ -1929,17 +1836,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建集群 (original openapi) tags: @@ -2016,17 +1919,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 发布参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建发布 (original openapi) tags: @@ -2098,9 +1997,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未找到活跃发布 summary: 获取最新活跃发布 (original openapi) tags: @@ -2194,17 +2091,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 合并参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 合并分支 (original openapi) tags: @@ -2403,9 +2296,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 发布回滚成功 summary: 回滚发布 (original openapi) tags: @@ -2678,10 +2569,10 @@ paths: tags: - Instance Management x-accepts: application/json - /openapi/v1/envs/{env}/releases/{releaseId}/instances: + /openapi/v1/envs/{env}/instances/by-release: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances" + description: "GET /openapi/v1/envs/{env}/instances/by-release" operationId: getByRelease parameters: - description: "" @@ -2693,13 +2584,14 @@ paths: type: string style: simple - description: "" - explode: false - in: path + explode: true + in: query name: releaseId required: true schema: + format: int64 type: integer - style: simple + style: form - description: "" example: 0 explode: true @@ -2726,7 +2618,7 @@ paths: page: 0 size: 0 total: 0 - content: + instances: - id: 0 appId: "" clusterName: "" @@ -2751,17 +2643,16 @@ paths: dataChangeLastModifiedTime: "" dataChangeCreatedTime: "" schema: - $ref: '#/components/schemas/OpenPageDTOOpenInstanceDTO' + $ref: '#/components/schemas/OpenInstancePageDTO' description: "" summary: 根据发布版本查询实例(支持分页) (new added) tags: - Instance Management x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: + /openapi/v1/envs/{env}/instances/by-namespace: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" - operationId: getByReleasesNotIn + operationId: getByNamespace parameters: - description: 环境标识 explode: false @@ -2772,33 +2663,137 @@ paths: type: string style: simple - description: 应用ID - explode: false - in: path + explode: true + in: query name: appId required: true schema: type: string - style: simple + style: form - description: 集群名称 - explode: false - in: path + explode: true + in: query name: clusterName required: true schema: type: string - style: simple + style: form - description: 命名空间名称 + explode: true + in: query + name: namespaceName + required: true + schema: + type: string + style: form + - description: Instance表中的AppID + explode: true + in: query + name: instanceAppId + required: false + schema: + type: string + style: form + - description: 页数 + explode: true + in: query + name: page + required: true + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: 页大小 + explode: true + in: query + name: size + required: true + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + example: + page: 0 + size: 0 + total: 0 + instances: + - id: 0 + appId: "" + clusterName: "" + dataCenter: "" + ip: "" + configs: + - release: + dataChangeCreatedBy: "" + dataChangeLastModifiedBy: "" + dataChangeCreatedTime: "" + dataChangeLastModifiedTime: "" + id: 0 + appId: "" + clusterName: "" + namespaceName: "" + name: "" + configurations: + ? "" + : "" + comment: "" + releaseDeliveryTime: "" + dataChangeLastModifiedTime: "" + dataChangeCreatedTime: "" + schema: + $ref: '#/components/schemas/OpenInstancePageDTO' + description: "" + summary: 根据namespaceName查询实例(new added) + tags: + - Instance Management + x-accepts: application/json + /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in: + get: + deprecated: false + operationId: getByReleasesAndNamespaceNotIn + parameters: + - description: 环境标识 explode: false in: path - name: namespaceName + name: env required: true schema: type: string style: simple + - description: 应用ID + explode: true + in: query + name: appId + required: true + schema: + type: string + style: form + - description: 集群名称 + explode: true + in: query + name: clusterName + required: true + schema: + type: string + style: form + - description: 命名空间名称 + explode: true + in: query + name: namespaceName + required: true + schema: + type: string + style: form - description: 排除的发布ID列表,用逗号分隔 explode: true in: query - name: excludeReleases + name: releaseIds required: false schema: type: string @@ -2919,17 +2914,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建AppNamespace (original openapi) tags: @@ -3215,9 +3206,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: AppNamespace删除成功 summary: 删除AppNamespace (new added) tags: @@ -3529,9 +3518,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 解除关联成功 summary: 删除关联的Namespace (new added) tags: @@ -3563,9 +3550,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 summary: 获取所有组织信息 (original openapi) tags: @@ -3648,9 +3633,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 分支不存在 summary: 获取命名空间分支信息 (original openapi) tags: @@ -3791,9 +3774,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 分支删除成功 summary: 删除命名空间分支 (original openapi) tags: @@ -4032,9 +4013,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 灰度规则更新成功 summary: 更新分支灰度发布规则 (original openapi) tags: @@ -4073,6 +4052,7 @@ components: orgName: orgName dataChangeLastModifiedBy: dataChangeLastModifiedBy ownerName: ownerName + ownerDisplayName: ownerDisplayName appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name @@ -4112,6 +4092,8 @@ components: ownerEmail: description: 应用负责人邮箱地址,用于接收应用相关通知 type: string + ownerDisplayName: + type: string type: object OpenCreateAppDTO: description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 @@ -4121,6 +4103,7 @@ components: orgName: orgName dataChangeLastModifiedBy: dataChangeLastModifiedBy ownerName: ownerName + ownerDisplayName: ownerDisplayName appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name @@ -4140,6 +4123,7 @@ components: items: type: string type: array + uniqueItems: true app: $ref: '#/components/schemas/OpenAppDTO' type: object @@ -4182,7 +4166,7 @@ components: description: 配置项的注释说明,用于描述配置项的用途和含义 type: string type: object - OpenPageDTOOpenItemDTO: + OpenItemPageDTO: description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 example: total: 1 @@ -4230,9 +4214,9 @@ components: appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - parentClusterId: 6 + parentClusterId: 1 comment: comment - id: 0 + id: 6 dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: @@ -4593,13 +4577,12 @@ components: description: 锁定者用户名 type: string type: object - OpenPageDTOOpenInstanceDTO: + OpenInstancePageDTO: description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 example: total: 1 size: 6 - page: 0 - content: + instances: - configs: - releaseDeliveryTime: 2025-09-29T12:34:56Z release: @@ -4674,6 +4657,7 @@ components: clusterName: clusterName ip: ip id: 5 + page: 0 properties: page: description: 当前页码,从0开始计数 @@ -4685,7 +4669,7 @@ components: description: 总记录数,符合查询条件的实例总数量 format: int64 type: integer - content: + instances: description: 当前页的实例列表,包含具体的实例数据 items: $ref: '#/components/schemas/OpenInstanceDTO' @@ -4708,7 +4692,36 @@ components: type: array type: object OpenEnvClusterInfo: + example: + code: 0 + message: message + env: env + clusters: + - dataChangeCreatedTime: 2025-09-29T12:34:56Z + dataChangeLastModifiedBy: dataChangeLastModifiedBy + appId: appId + dataChangeCreatedBy: dataChangeCreatedBy + name: name + parentClusterId: 1 + comment: comment + id: 6 + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - dataChangeCreatedTime: 2025-09-29T12:34:56Z + dataChangeLastModifiedBy: dataChangeLastModifiedBy + appId: appId + dataChangeCreatedBy: dataChangeCreatedBy + name: name + parentClusterId: 1 + comment: comment + id: 6 + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: + code: + description: 查询状态码 + type: integer + message: + description: 相关信息 + type: string env: description: 环境标识 type: string @@ -4718,6 +4731,17 @@ components: $ref: '#/components/schemas/OpenClusterDTO' type: array type: object + OpenMissEnvDTO: + example: + code: 0 + message: message + properties: + code: + description: 查询状态码 + type: integer + message: + type: string + type: object OpenNamespaceTextModel: example: configText: configText @@ -5137,14 +5161,25 @@ components: type: string type: object ExceptionResponse: - additionalProperties: true - description: | - 错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) example: status: 404 message: Resource not found timestamp: 2025-09-29T12:34:56Z exception: NotFoundException + properties: + status: + description: HTTP 状态码 + type: integer + message: + description: 错误信息 + type: string + timestamp: + description: 时间戳 + format: date-time + type: string + exception: + description: 错误类名 + type: string type: object SuccessEmptyResponse: properties: {} @@ -5163,15 +5198,6 @@ components: type: object MultiResponseEntity: description: A response container holding multiple RichResponseEntity objects - example: - code: 200 - entities: - - code: 200 - message: OK - body: "{}" - - code: 200 - message: OK - body: "{}" properties: code: description: Overall HTTP status code @@ -5189,10 +5215,6 @@ components: RichResponseEntity: description: "A wrapper for a single response entity with code, message, and\ \ body" - example: - code: 200 - message: OK - body: "{}" properties: code: description: HTTP status code diff --git a/java-client/docs/AppManagementApi.md b/java-client/docs/AppManagementApi.md index 8ac8adb..4985233 100644 --- a/java-client/docs/AppManagementApi.md +++ b/java-client/docs/AppManagementApi.md @@ -9,17 +9,17 @@ All URIs are relative to *http://localhost* | [**deleteApp**](AppManagementApi.md#deleteApp) | **DELETE** /openapi/v1/apps/{appId} | 删除应用(new added) | | [**findApps**](AppManagementApi.md#findApps) | **GET** /openapi/v1/apps | 查找应用 (original openapi) | | [**findAppsAuthorized**](AppManagementApi.md#findAppsAuthorized) | **GET** /openapi/v1/apps/authorized | 获取当前Consumer授权的应用列表 (original openapi) | -| [**findMissEnvs**](AppManagementApi.md#findMissEnvs) | **GET** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境(new added) | +| [**findMissEnvs**](AppManagementApi.md#findMissEnvs) | **GET** /openapi/v1/apps/{appId}/miss-envs | 查找缺失的环境(new added) | | [**getApp**](AppManagementApi.md#getApp) | **GET** /openapi/v1/apps/{appId} | 获取单个应用信息(new added) | -| [**getAppNavTree**](AppManagementApi.md#getAppNavTree) | **GET** /openapi/v1/apps/{appId}/navtree | 获取应用导航树(new added) | -| [**getAppsBySelf**](AppManagementApi.md#getAppsBySelf) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页)(new added) | -| [**getEnvClusterInfo**](AppManagementApi.md#getEnvClusterInfo) | **GET** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) | +| [**getAppsBySelf**](AppManagementApi.md#getAppsBySelf) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) | +| [**getEnvClusterInfo**](AppManagementApi.md#getEnvClusterInfo) | **GET** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) | +| [**getEnvClusters**](AppManagementApi.md#getEnvClusters) | **GET** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) | | [**updateApp**](AppManagementApi.md#updateApp) | **PUT** /openapi/v1/apps/{appId} | 更新应用(new added) | # **createApp** -> Object createApp(openCreateAppDTO) +> OpenAppDTO createApp(openCreateAppDTO) 创建应用 (original openapi) @@ -49,7 +49,7 @@ public class Example { AppManagementApi apiInstance = new AppManagementApi(defaultClient); OpenCreateAppDTO openCreateAppDTO = new OpenCreateAppDTO(); // OpenCreateAppDTO | try { - Object result = apiInstance.createApp(openCreateAppDTO); + OpenAppDTO result = apiInstance.createApp(openCreateAppDTO); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppManagementApi#createApp"); @@ -70,7 +70,7 @@ public class Example { ### Return type -**Object** +[**OpenAppDTO**](OpenAppDTO.md) ### Authorization @@ -90,7 +90,7 @@ public class Example { # **createAppInEnv** -> Object createAppInEnv(env, operator, openAppDTO) +> Object createAppInEnv(env, openAppDTO, operator) 在指定环境创建应用(new added) @@ -119,10 +119,10 @@ public class Example { AppManagementApi apiInstance = new AppManagementApi(defaultClient); String env = "env_example"; // String | 环境标识,例如 DEV、FAT、UAT、PROD - String operator = "operator_example"; // String | 操作人用户名 OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | + String operator = "operator_example"; // String | 操作人用户名 try { - Object result = apiInstance.createAppInEnv(env, operator, openAppDTO); + Object result = apiInstance.createAppInEnv(env, openAppDTO, operator); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppManagementApi#createAppInEnv"); @@ -140,8 +140,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **env** | **String**| 环境标识,例如 DEV、FAT、UAT、PROD | | -| **operator** | **String**| 操作人用户名 | | | **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type @@ -214,7 +214,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| 应用ID | | -| **operator** | **String**| 操作人用户名 | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type @@ -374,11 +374,11 @@ This endpoint does not need any parameter. # **findMissEnvs** -> MultiResponseEntity findMissEnvs(appId) +> List<OpenMissEnvDTO> findMissEnvs(appId) 查找缺失的环境(new added) -GET /openapi/v1/apps/{appId}/miss_envs +GET /openapi/v1/apps/{appId}/miss-envs ### Example ```java @@ -404,7 +404,7 @@ public class Example { AppManagementApi apiInstance = new AppManagementApi(defaultClient); String appId = "appId_example"; // String | 应用ID try { - MultiResponseEntity result = apiInstance.findMissEnvs(appId); + List result = apiInstance.findMissEnvs(appId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppManagementApi#findMissEnvs"); @@ -425,7 +425,7 @@ public class Example { ### Return type -[**MultiResponseEntity**](MultiResponseEntity.md) +[**List<OpenMissEnvDTO>**](OpenMissEnvDTO.md) ### Authorization @@ -512,13 +512,13 @@ public class Example { | **200** | 成功获取应用信息 | - | | **404** | 应用不存在 | - | - -# **getAppNavTree** -> MultiResponseEntity getAppNavTree(appId) + +# **getAppsBySelf** +> List<OpenAppDTO> getAppsBySelf(page, size) -获取应用导航树(new added) +获取当前Consumer/User的应用列表(分页)(new added) -GET /openapi/v1/apps/{appId}/navtree +GET /openapi/v1/apps/by-self ### Example ```java @@ -542,12 +542,13 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID + Integer page = 56; // Integer | 页数 + Integer size = 56; // Integer | 页大小 try { - MultiResponseEntity result = apiInstance.getAppNavTree(appId); + List result = apiInstance.getAppsBySelf(page, size); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#getAppNavTree"); + System.err.println("Exception when calling AppManagementApi#getAppsBySelf"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -561,11 +562,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | +| **page** | **Integer**| 页数 | | +| **size** | **Integer**| 页大小 | | ### Return type -[**MultiResponseEntity**](MultiResponseEntity.md) +[**List<OpenAppDTO>**](OpenAppDTO.md) ### Authorization @@ -579,15 +581,16 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取应用导航树 | - | +| **200** | 成功获取Consumer的应用列表 | - | +| **401** | 未授权访问 | - | - -# **getAppsBySelf** -> List<OpenAppDTO> getAppsBySelf(page, size) + +# **getEnvClusterInfo** +> List<OpenEnvClusterInfo> getEnvClusterInfo(appId) -获取当前Consumer的应用列表(分页)(new added) +获取应用环境集群详情(new added) -GET /openapi/v1/apps/by-self +/openapi/v1/apps/{appId}/env-cluster-info ### Example ```java @@ -611,13 +614,12 @@ public class Example { //ApiKeyAuth.setApiKeyPrefix("Token"); AppManagementApi apiInstance = new AppManagementApi(defaultClient); - Integer page = 56; // Integer | 页数 - Integer size = 56; // Integer | 页大小 + String appId = "appId_example"; // String | 应用ID try { - List result = apiInstance.getAppsBySelf(page, size); + List result = apiInstance.getEnvClusterInfo(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#getAppsBySelf"); + System.err.println("Exception when calling AppManagementApi#getEnvClusterInfo"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -631,12 +633,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **page** | **Integer**| 页数 | | -| **size** | **Integer**| 页大小 | | +| **appId** | **String**| 应用ID | | ### Return type -[**List<OpenAppDTO>**](OpenAppDTO.md) +[**List<OpenEnvClusterInfo>**](OpenEnvClusterInfo.md) ### Authorization @@ -650,16 +651,15 @@ public class Example { ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | 成功获取Consumer的应用列表 | - | -| **401** | 未授权访问 | - | +| **200** | 成功获取应用环境集群详情 | - | - -# **getEnvClusterInfo** -> List<OpenEnvClusterDTO> getEnvClusterInfo(appId) + +# **getEnvClusters** +> List<OpenEnvClusterDTO> getEnvClusters(appId) 获取应用的环境集群信息 (original openapi) -GET /openapi/v1/apps/{appId}/envclusters +GET /openapi/v1/apps/{appId}/envClusters ### Example ```java @@ -685,10 +685,10 @@ public class Example { AppManagementApi apiInstance = new AppManagementApi(defaultClient); String appId = "appId_example"; // String | 应用ID try { - List result = apiInstance.getEnvClusterInfo(appId); + List result = apiInstance.getEnvClusters(appId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#getEnvClusterInfo"); + System.err.println("Exception when calling AppManagementApi#getEnvClusters"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -725,7 +725,7 @@ public class Example { # **updateApp** -> OpenAppDTO updateApp(appId, operator, openAppDTO) +> Object updateApp(appId, openAppDTO, operator) 更新应用(new added) @@ -754,10 +754,10 @@ public class Example { AppManagementApi apiInstance = new AppManagementApi(defaultClient); String appId = "appId_example"; // String | 应用ID - String operator = "operator_example"; // String | 操作人用户名 OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | + String operator = "operator_example"; // String | 操作人用户名 try { - OpenAppDTO result = apiInstance.updateApp(appId, operator, openAppDTO); + Object result = apiInstance.updateApp(appId, openAppDTO, operator); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AppManagementApi#updateApp"); @@ -775,12 +775,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **appId** | **String**| 应用ID | | -| **operator** | **String**| 操作人用户名 | | | **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | +| **operator** | **String**| 操作人用户名 | [optional] | ### Return type -[**OpenAppDTO**](OpenAppDTO.md) +**Object** ### Authorization diff --git a/java-client/docs/ExceptionResponse.md b/java-client/docs/ExceptionResponse.md new file mode 100644 index 0000000..059e5bf --- /dev/null +++ b/java-client/docs/ExceptionResponse.md @@ -0,0 +1,13 @@ + + +# ExceptionResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **Integer** | HTTP 状态码 | [optional] | +|**message** | **String** | 错误信息 | [optional] | +|**timestamp** | **OffsetDateTime** | 时间戳 | [optional] | +|**exception** | **String** | 错误类名 | [optional] | diff --git a/java-client/docs/InstanceManagementApi.md b/java-client/docs/InstanceManagementApi.md index 6e2c7d7..82cfcd4 100644 --- a/java-client/docs/InstanceManagementApi.md +++ b/java-client/docs/InstanceManagementApi.md @@ -4,18 +4,98 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getByRelease**](InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) | -| [**getByReleasesNotIn**](InstanceManagementApi.md#getByReleasesNotIn) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) | +| [**getByNamespace**](InstanceManagementApi.md#getByNamespace) | **GET** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) | +| [**getByRelease**](InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) | +| [**getByReleasesAndNamespaceNotIn**](InstanceManagementApi.md#getByReleasesAndNamespaceNotIn) | **GET** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) | | [**getInstanceCountByNamespace**](InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) | + +# **getByNamespace** +> OpenInstancePageDTO getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId) + +根据namespaceName查询实例(new added) + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.InstanceManagementApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); + String env = "env_example"; // String | 环境标识 + String appId = "appId_example"; // String | 应用ID + String clusterName = "clusterName_example"; // String | 集群名称 + String namespaceName = "namespaceName_example"; // String | 命名空间名称 + Integer page = 0; // Integer | 页数 + Integer size = 0; // Integer | 页大小 + String instanceAppId = "instanceAppId_example"; // String | Instance表中的AppID + try { + OpenInstancePageDTO result = apiInstance.getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling InstanceManagementApi#getByNamespace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **env** | **String**| 环境标识 | | +| **appId** | **String**| 应用ID | | +| **clusterName** | **String**| 集群名称 | | +| **namespaceName** | **String**| 命名空间名称 | | +| **page** | **Integer**| 页数 | [default to 0] | +| **size** | **Integer**| 页大小 | [default to 0] | +| **instanceAppId** | **String**| Instance表中的AppID | [optional] | + +### Return type + +[**OpenInstancePageDTO**](OpenInstancePageDTO.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** | | - | + # **getByRelease** -> OpenPageDTOOpenInstanceDTO getByRelease(env, releaseId, page, size) +> OpenInstancePageDTO getByRelease(env, releaseId, page, size) 根据发布版本查询实例(支持分页) (new added) -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances +GET /openapi/v1/envs/{env}/instances/by-release ### Example ```java @@ -40,11 +120,11 @@ public class Example { InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); String env = "env_example"; // String | - Integer releaseId = 56; // Integer | + Long releaseId = 56L; // Long | Integer page = 0; // Integer | Integer size = 20; // Integer | try { - OpenPageDTOOpenInstanceDTO result = apiInstance.getByRelease(env, releaseId, page, size); + OpenInstancePageDTO result = apiInstance.getByRelease(env, releaseId, page, size); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling InstanceManagementApi#getByRelease"); @@ -62,13 +142,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **env** | **String**| | | -| **releaseId** | **Integer**| | | +| **releaseId** | **Long**| | | | **page** | **Integer**| | | | **size** | **Integer**| | | ### Return type -[**OpenPageDTOOpenInstanceDTO**](OpenPageDTOOpenInstanceDTO.md) +[**OpenInstancePageDTO**](OpenInstancePageDTO.md) ### Authorization @@ -84,14 +164,12 @@ public class Example { |-------------|-------------|------------------| | **200** | | - | - -# **getByReleasesNotIn** -> List<OpenInstanceDTO> getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases) + +# **getByReleasesAndNamespaceNotIn** +> List<OpenInstanceDTO> getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds) 查询不在指定发布版本中的实例 (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - ### Example ```java // Import classes: @@ -118,12 +196,12 @@ public class Example { String appId = "appId_example"; // String | 应用ID String clusterName = "clusterName_example"; // String | 集群名称 String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String excludeReleases = "excludeReleases_example"; // String | 排除的发布ID列表,用逗号分隔 + String releaseIds = "releaseIds_example"; // String | 排除的发布ID列表,用逗号分隔 try { - List result = apiInstance.getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases); + List result = apiInstance.getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#getByReleasesNotIn"); + System.err.println("Exception when calling InstanceManagementApi#getByReleasesAndNamespaceNotIn"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -141,7 +219,7 @@ public class Example { | **appId** | **String**| 应用ID | | | **clusterName** | **String**| 集群名称 | | | **namespaceName** | **String**| 命名空间名称 | | -| **excludeReleases** | **String**| 排除的发布ID列表,用逗号分隔 | [optional] | +| **releaseIds** | **String**| 排除的发布ID列表,用逗号分隔 | [optional] | ### Return type diff --git a/java-client/docs/ItemManagementApi.md b/java-client/docs/ItemManagementApi.md index a0a7f8f..df5c7fa 100644 --- a/java-client/docs/ItemManagementApi.md +++ b/java-client/docs/ItemManagementApi.md @@ -418,7 +418,7 @@ public class Example { # **findItemsByNamespace** -> OpenPageDTOOpenItemDTO findItemsByNamespace(appId, env, clusterName, namespaceName, page, size) +> OpenItemPageDTO findItemsByNamespace(appId, env, clusterName, namespaceName, page, size) 获取命名空间下的配置项列表 (original openapi) @@ -453,7 +453,7 @@ public class Example { Integer page = 0; // Integer | 页码,从0开始 Integer size = 50; // Integer | 每页数量 try { - OpenPageDTOOpenItemDTO result = apiInstance.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); + OpenItemPageDTO result = apiInstance.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ItemManagementApi#findItemsByNamespace"); @@ -479,7 +479,7 @@ public class Example { ### Return type -[**OpenPageDTOOpenItemDTO**](OpenPageDTOOpenItemDTO.md) +[**OpenItemPageDTO**](OpenItemPageDTO.md) ### Authorization diff --git a/java-client/docs/OpenAppDTO.md b/java-client/docs/OpenAppDTO.md index 521706e..31a5fbc 100644 --- a/java-client/docs/OpenAppDTO.md +++ b/java-client/docs/OpenAppDTO.md @@ -18,3 +18,4 @@ Apollo应用信息数据传输对象,包含应用的基本信息和元数据 |**orgName** | **String** | 组织名称,应用所属组织的显示名称 | [optional] | |**ownerName** | **String** | 应用负责人姓名,应用的主要负责人 | [optional] | |**ownerEmail** | **String** | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] | +|**ownerDisplayName** | **String** | | [optional] | diff --git a/java-client/docs/OpenCreateAppDTO.md b/java-client/docs/OpenCreateAppDTO.md index e297c90..7baaff9 100644 --- a/java-client/docs/OpenCreateAppDTO.md +++ b/java-client/docs/OpenCreateAppDTO.md @@ -9,5 +9,5 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**assignAppRoleToSelf** | **Boolean** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] | -|**admins** | **List<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] | +|**admins** | **Set<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] | |**app** | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] | diff --git a/java-client/docs/OpenEnvClusterInfo.md b/java-client/docs/OpenEnvClusterInfo.md index d9f13bb..cca2f6f 100644 --- a/java-client/docs/OpenEnvClusterInfo.md +++ b/java-client/docs/OpenEnvClusterInfo.md @@ -7,5 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | 查询状态码 | [optional] | +|**message** | **String** | 相关信息 | [optional] | |**env** | **String** | 环境标识 | [optional] | |**clusters** | [**List<OpenClusterDTO>**](OpenClusterDTO.md) | 集群信息列表 | [optional] | diff --git a/java-client/docs/OpenPageDTOOpenInstanceDTO.md b/java-client/docs/OpenInstancePageDTO.md similarity index 71% rename from java-client/docs/OpenPageDTOOpenInstanceDTO.md rename to java-client/docs/OpenInstancePageDTO.md index 8321218..9f4f32e 100644 --- a/java-client/docs/OpenPageDTOOpenInstanceDTO.md +++ b/java-client/docs/OpenInstancePageDTO.md @@ -1,6 +1,6 @@ -# OpenPageDTOOpenInstanceDTO +# OpenInstancePageDTO 分页实例数据传输对象,用于返回分页查询的实例列表结果 @@ -11,4 +11,4 @@ |**page** | **Integer** | 当前页码,从0开始计数 | [optional] | |**size** | **Integer** | 每页显示的记录数量 | [optional] | |**total** | **Long** | 总记录数,符合查询条件的实例总数量 | [optional] | -|**content** | [**List<OpenInstanceDTO>**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] | +|**instances** | [**List<OpenInstanceDTO>**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] | diff --git a/java-client/docs/OpenPageDTOOpenItemDTO.md b/java-client/docs/OpenItemPageDTO.md similarity index 95% rename from java-client/docs/OpenPageDTOOpenItemDTO.md rename to java-client/docs/OpenItemPageDTO.md index 411b475..013107f 100644 --- a/java-client/docs/OpenPageDTOOpenItemDTO.md +++ b/java-client/docs/OpenItemPageDTO.md @@ -1,6 +1,6 @@ -# OpenPageDTOOpenItemDTO +# OpenItemPageDTO 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 diff --git a/java-client/docs/OpenMissEnvDTO.md b/java-client/docs/OpenMissEnvDTO.md new file mode 100644 index 0000000..982ca5f --- /dev/null +++ b/java-client/docs/OpenMissEnvDTO.md @@ -0,0 +1,11 @@ + + +# OpenMissEnvDTO + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**code** | **Integer** | 查询状态码 | [optional] | +|**message** | **String** | | [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 4c2d730..b44cd39 100644 --- a/java-client/src/main/java/org/openapitools/client/JSON.java +++ b/java-client/src/main/java/org/openapitools/client/JSON.java @@ -93,6 +93,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); 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()); @@ -107,17 +108,18 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenGrayReleaseRuleItemDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstanceConfigDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenInstanceDTO.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.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.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.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.OpenNamespaceTextModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenOrganizationDto.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenPageDTOOpenInstanceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenPageDTOOpenItemDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseBO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseDTO.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichResponseEntity.CustomTypeAdapterFactory()); 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 3a2081b..1cd6a54 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 @@ -27,10 +27,12 @@ import java.io.IOException; -import org.openapitools.client.model.MultiResponseEntity; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenAppDTO; import org.openapitools.client.model.OpenCreateAppDTO; import org.openapitools.client.model.OpenEnvClusterDTO; +import org.openapitools.client.model.OpenEnvClusterInfo; +import org.openapitools.client.model.OpenMissEnvDTO; import java.lang.reflect.Type; import java.util.ArrayList; @@ -150,7 +152,7 @@ private okhttp3.Call createAppValidateBeforeCall(OpenCreateAppDTO openCreateAppD * 创建应用 (original openapi) * POST /openapi/v1/apps * @param openCreateAppDTO (required) - * @return Object + * @return OpenAppDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -160,8 +162,8 @@ private okhttp3.Call createAppValidateBeforeCall(OpenCreateAppDTO openCreateAppD
403 权限不足 -
*/ - public Object createApp(OpenCreateAppDTO openCreateAppDTO) throws ApiException { - ApiResponse localVarResp = createAppWithHttpInfo(openCreateAppDTO); + public OpenAppDTO createApp(OpenCreateAppDTO openCreateAppDTO) throws ApiException { + ApiResponse localVarResp = createAppWithHttpInfo(openCreateAppDTO); return localVarResp.getData(); } @@ -169,7 +171,7 @@ public Object createApp(OpenCreateAppDTO openCreateAppDTO) throws ApiException { * 创建应用 (original openapi) * POST /openapi/v1/apps * @param openCreateAppDTO (required) - * @return ApiResponse<Object> + * @return ApiResponse<OpenAppDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -179,9 +181,9 @@ public Object createApp(OpenCreateAppDTO openCreateAppDTO) throws ApiException {
403 权限不足 -
*/ - public ApiResponse createAppWithHttpInfo(OpenCreateAppDTO openCreateAppDTO) throws ApiException { + public ApiResponse createAppWithHttpInfo(OpenCreateAppDTO openCreateAppDTO) throws ApiException { okhttp3.Call localVarCall = createAppValidateBeforeCall(openCreateAppDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -200,18 +202,18 @@ public ApiResponse createAppWithHttpInfo(OpenCreateAppDTO openCreateAppD 403 权限不足 - */ - public okhttp3.Call createAppAsync(OpenCreateAppDTO openCreateAppDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppAsync(OpenCreateAppDTO openCreateAppDTO, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createAppValidateBeforeCall(openCreateAppDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createAppInEnv * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (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 @@ -223,7 +225,7 @@ public okhttp3.Call createAppAsync(OpenCreateAppDTO openCreateAppDTO, final ApiC 403 权限不足 - */ - public okhttp3.Call createAppInEnvCall(String env, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppInEnvCall(String env, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -274,23 +276,18 @@ public okhttp3.Call createAppInEnvCall(String env, String operator, OpenAppDTO o } @SuppressWarnings("rawtypes") - private okhttp3.Call createAppInEnvValidateBeforeCall(String env, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createAppInEnvValidateBeforeCall(String env, OpenAppDTO openAppDTO, 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 createAppInEnv(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling createAppInEnv(Async)"); - } - // verify the required parameter 'openAppDTO' is set if (openAppDTO == null) { throw new ApiException("Missing the required parameter 'openAppDTO' when calling createAppInEnv(Async)"); } - return createAppInEnvCall(env, operator, openAppDTO, _callback); + return createAppInEnvCall(env, openAppDTO, operator, _callback); } @@ -298,8 +295,8 @@ private okhttp3.Call createAppInEnvValidateBeforeCall(String env, String operato * 在指定环境创建应用(new added) * POST /openapi/v1/apps/envs/{env} * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (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 @@ -310,8 +307,8 @@ private okhttp3.Call createAppInEnvValidateBeforeCall(String env, String operato 403 权限不足 - */ - public Object createAppInEnv(String env, String operator, OpenAppDTO openAppDTO) throws ApiException { - ApiResponse localVarResp = createAppInEnvWithHttpInfo(env, operator, openAppDTO); + public Object createAppInEnv(String env, OpenAppDTO openAppDTO, String operator) throws ApiException { + ApiResponse localVarResp = createAppInEnvWithHttpInfo(env, openAppDTO, operator); return localVarResp.getData(); } @@ -319,8 +316,8 @@ public Object createAppInEnv(String env, String operator, OpenAppDTO openAppDTO) * 在指定环境创建应用(new added) * POST /openapi/v1/apps/envs/{env} * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (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 @@ -331,8 +328,8 @@ public Object createAppInEnv(String env, String operator, OpenAppDTO openAppDTO) 403 权限不足 - */ - public ApiResponse createAppInEnvWithHttpInfo(String env, String operator, OpenAppDTO openAppDTO) throws ApiException { - okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, operator, openAppDTO, null); + public ApiResponse createAppInEnvWithHttpInfo(String env, OpenAppDTO openAppDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, openAppDTO, operator, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -341,8 +338,8 @@ public ApiResponse createAppInEnvWithHttpInfo(String env, String operato * 在指定环境创建应用(new added) (asynchronously) * POST /openapi/v1/apps/envs/{env} * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (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 @@ -354,9 +351,9 @@ public ApiResponse createAppInEnvWithHttpInfo(String env, String operato 403 权限不足 - */ - public okhttp3.Call createAppInEnvAsync(String env, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createAppInEnvAsync(String env, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, operator, openAppDTO, _callback); + okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, openAppDTO, operator, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -364,7 +361,7 @@ public okhttp3.Call createAppInEnvAsync(String env, String operator, OpenAppDTO /** * Build call for deleteApp * @param appId 应用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 @@ -432,11 +429,6 @@ private okhttp3.Call deleteAppValidateBeforeCall(String appId, String operator, throw new ApiException("Missing the required parameter 'appId' when calling deleteApp(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling deleteApp(Async)"); - } - return deleteAppCall(appId, operator, _callback); } @@ -445,7 +437,7 @@ private okhttp3.Call deleteAppValidateBeforeCall(String appId, String operator, * 删除应用(new added) * DELETE /openapi/v1/apps/{appId} * @param appId 应用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 @@ -465,7 +457,7 @@ public Object deleteApp(String appId, String operator) throws ApiException { * 删除应用(new added) * DELETE /openapi/v1/apps/{appId} * @param appId 应用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 @@ -486,7 +478,7 @@ public ApiResponse deleteAppWithHttpInfo(String appId, String operator) * 删除应用(new added) (asynchronously) * DELETE /openapi/v1/apps/{appId} * @param appId 应用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 @@ -777,7 +769,7 @@ public okhttp3.Call findMissEnvsCall(String appId, final ApiCallback _callback) Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/miss_envs" + String localVarPath = "/openapi/v1/apps/{appId}/miss-envs" .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); @@ -818,9 +810,9 @@ private okhttp3.Call findMissEnvsValidateBeforeCall(String appId, final ApiCallb /** * 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs * @param appId 应用ID (required) - * @return MultiResponseEntity + * @return List<OpenMissEnvDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -829,16 +821,16 @@ private okhttp3.Call findMissEnvsValidateBeforeCall(String appId, final ApiCallb
404 应用不存在 -
*/ - public MultiResponseEntity findMissEnvs(String appId) throws ApiException { - ApiResponse localVarResp = findMissEnvsWithHttpInfo(appId); + public List findMissEnvs(String appId) throws ApiException { + ApiResponse> localVarResp = findMissEnvsWithHttpInfo(appId); return localVarResp.getData(); } /** * 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs * @param appId 应用ID (required) - * @return ApiResponse<MultiResponseEntity> + * @return ApiResponse<List<OpenMissEnvDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -847,15 +839,15 @@ public MultiResponseEntity findMissEnvs(String appId) throws ApiException {
404 应用不存在 -
*/ - public ApiResponse findMissEnvsWithHttpInfo(String appId) throws ApiException { + public ApiResponse> findMissEnvsWithHttpInfo(String appId) throws ApiException { okhttp3.Call localVarCall = findMissEnvsValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 查找缺失的环境(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs * @param appId 应用ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -867,10 +859,10 @@ public ApiResponse findMissEnvsWithHttpInfo(String appId) t 404 应用不存在 - */ - public okhttp3.Call findMissEnvsAsync(String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call findMissEnvsAsync(String appId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = findMissEnvsValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1002,18 +994,20 @@ public okhttp3.Call getAppAsync(String appId, final ApiCallback _cal return localVarCall; } /** - * Build call for getAppNavTree - * @param appId 应用ID (required) + * Build call for getAppsBySelf + * @param page 页数 (required) + * @param size 页大小 (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details - + +
Status Code Description Response Headers
200 成功获取应用导航树 -
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call getAppNavTreeCall(String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppsBySelfCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1030,8 +1024,7 @@ public okhttp3.Call getAppNavTreeCall(String appId, final ApiCallback _callback) Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/navtree" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); + String localVarPath = "/openapi/v1/apps/by-self"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1039,6 +1032,14 @@ public okhttp3.Call getAppNavTreeCall(String appId, final ApiCallback _callback) 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" }; @@ -1059,86 +1060,95 @@ public okhttp3.Call getAppNavTreeCall(String appId, final ApiCallback _callback) } @SuppressWarnings("rawtypes") - private okhttp3.Call getAppNavTreeValidateBeforeCall(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 getAppNavTree(Async)"); + private okhttp3.Call getAppsBySelfValidateBeforeCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling getAppsBySelf(Async)"); } - return getAppNavTreeCall(appId, _callback); + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling getAppsBySelf(Async)"); + } + + return getAppsBySelfCall(page, size, _callback); } /** - * 获取应用导航树(new added) - * GET /openapi/v1/apps/{appId}/navtree - * @param appId 应用ID (required) - * @return MultiResponseEntity + * 获取当前Consumer/User的应用列表(分页)(new added) + * GET /openapi/v1/apps/by-self + * @param page 页数 (required) + * @param size 页大小 (required) + * @return List<OpenAppDTO> * @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 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public MultiResponseEntity getAppNavTree(String appId) throws ApiException { - ApiResponse localVarResp = getAppNavTreeWithHttpInfo(appId); + public List getAppsBySelf(Integer page, Integer size) throws ApiException { + ApiResponse> localVarResp = getAppsBySelfWithHttpInfo(page, size); return localVarResp.getData(); } /** - * 获取应用导航树(new added) - * GET /openapi/v1/apps/{appId}/navtree - * @param appId 应用ID (required) - * @return ApiResponse<MultiResponseEntity> + * 获取当前Consumer/User的应用列表(分页)(new added) + * GET /openapi/v1/apps/by-self + * @param page 页数 (required) + * @param size 页大小 (required) + * @return ApiResponse<List<OpenAppDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details - + +
Status Code Description Response Headers
200 成功获取应用导航树 -
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public ApiResponse getAppNavTreeWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getAppNavTreeValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> getAppsBySelfWithHttpInfo(Integer page, Integer size) throws ApiException { + okhttp3.Call localVarCall = getAppsBySelfValidateBeforeCall(page, size, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取应用导航树(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/navtree - * @param appId 应用ID (required) + * 获取当前Consumer/User的应用列表(分页)(new added) (asynchronously) + * GET /openapi/v1/apps/by-self + * @param page 页数 (required) + * @param size 页大小 (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details - + +
Status Code Description Response Headers
200 成功获取应用导航树 -
200 成功获取Consumer的应用列表 -
401 未授权访问 -
*/ - public okhttp3.Call getAppNavTreeAsync(String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAppsBySelfAsync(Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getAppNavTreeValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getAppsBySelfValidateBeforeCall(page, size, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getAppsBySelf - * @param page 页数 (required) - * @param size 页大小 (required) + * Build call for getEnvClusterInfo + * @param appId 应用ID (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 成功获取Consumer的应用列表 -
401 未授权访问 -
200 成功获取应用环境集群详情 -
*/ - public okhttp3.Call getAppsBySelfCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEnvClusterInfoCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1155,7 +1165,8 @@ public okhttp3.Call getAppsBySelfCall(Integer page, Integer size, final ApiCallb Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/apps/by-self"; + String localVarPath = "/openapi/v1/apps/{appId}/env-cluster-info" + .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1163,14 +1174,6 @@ public okhttp3.Call getAppsBySelfCall(Integer page, Integer size, final ApiCallb 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" }; @@ -1191,84 +1194,73 @@ public okhttp3.Call getAppsBySelfCall(Integer page, Integer size, final ApiCallb } @SuppressWarnings("rawtypes") - private okhttp3.Call getAppsBySelfValidateBeforeCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling getAppsBySelf(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling getAppsBySelf(Async)"); + private okhttp3.Call getEnvClusterInfoValidateBeforeCall(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 getEnvClusterInfo(Async)"); } - return getAppsBySelfCall(page, size, _callback); + return getEnvClusterInfoCall(appId, _callback); } /** - * 获取当前Consumer的应用列表(分页)(new added) - * GET /openapi/v1/apps/by-self - * @param page 页数 (required) - * @param size 页大小 (required) - * @return List<OpenAppDTO> + * 获取应用环境集群详情(new added) + * /openapi/v1/apps/{appId}/env-cluster-info + * @param appId 应用ID (required) + * @return List<OpenEnvClusterInfo> * @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 成功获取Consumer的应用列表 -
401 未授权访问 -
200 成功获取应用环境集群详情 -
*/ - public List getAppsBySelf(Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = getAppsBySelfWithHttpInfo(page, size); + public List getEnvClusterInfo(String appId) throws ApiException { + ApiResponse> localVarResp = getEnvClusterInfoWithHttpInfo(appId); return localVarResp.getData(); } /** - * 获取当前Consumer的应用列表(分页)(new added) - * GET /openapi/v1/apps/by-self - * @param page 页数 (required) - * @param size 页大小 (required) - * @return ApiResponse<List<OpenAppDTO>> + * 获取应用环境集群详情(new added) + * /openapi/v1/apps/{appId}/env-cluster-info + * @param appId 应用ID (required) + * @return ApiResponse<List<OpenEnvClusterInfo>> * @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 成功获取Consumer的应用列表 -
401 未授权访问 -
200 成功获取应用环境集群详情 -
*/ - public ApiResponse> getAppsBySelfWithHttpInfo(Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = getAppsBySelfValidateBeforeCall(page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> getEnvClusterInfoWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * 获取当前Consumer的应用列表(分页)(new added) (asynchronously) - * GET /openapi/v1/apps/by-self - * @param page 页数 (required) - * @param size 页大小 (required) + * 获取应用环境集群详情(new added) (asynchronously) + * /openapi/v1/apps/{appId}/env-cluster-info + * @param appId 应用ID (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 成功获取Consumer的应用列表 -
401 未授权访问 -
200 成功获取应用环境集群详情 -
*/ - public okhttp3.Call getAppsBySelfAsync(Integer page, Integer size, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getEnvClusterInfoAsync(String appId, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getAppsBySelfValidateBeforeCall(page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getEnvClusterInfo + * Build call for getEnvClusters * @param appId 应用ID (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1280,7 +1272,7 @@ public okhttp3.Call getAppsBySelfAsync(Integer page, Integer size, final ApiCall 404 应用不存在 - */ - public okhttp3.Call getEnvClusterInfoCall(String appId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getEnvClustersCall(String appId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1326,19 +1318,19 @@ public okhttp3.Call getEnvClusterInfoCall(String appId, final ApiCallback _callb } @SuppressWarnings("rawtypes") - private okhttp3.Call getEnvClusterInfoValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getEnvClustersValidateBeforeCall(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 getEnvClusterInfo(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getEnvClusters(Async)"); } - return getEnvClusterInfoCall(appId, _callback); + return getEnvClustersCall(appId, _callback); } /** * 获取应用的环境集群信息 (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 @@ -1349,14 +1341,14 @@ private okhttp3.Call getEnvClusterInfoValidateBeforeCall(String appId, final Api 404 应用不存在 - */ - public List getEnvClusterInfo(String appId) throws ApiException { - ApiResponse> localVarResp = getEnvClusterInfoWithHttpInfo(appId); + public List getEnvClusters(String appId) throws ApiException { + ApiResponse> localVarResp = getEnvClustersWithHttpInfo(appId); return localVarResp.getData(); } /** * 获取应用的环境集群信息 (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,15 +1359,15 @@ public List getEnvClusterInfo(String appId) throws ApiExcepti 404 应用不存在 - */ - public ApiResponse> getEnvClusterInfoWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, null); + public ApiResponse> getEnvClustersWithHttpInfo(String appId) throws ApiException { + okhttp3.Call localVarCall = getEnvClustersValidateBeforeCall(appId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 获取应用的环境集群信息 (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 @@ -1387,9 +1379,9 @@ public ApiResponse> getEnvClusterInfoWithHttpInfo(String 404 应用不存在 - */ - public okhttp3.Call getEnvClusterInfoAsync(String appId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getEnvClustersAsync(String appId, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, _callback); + okhttp3.Call localVarCall = getEnvClustersValidateBeforeCall(appId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1397,8 +1389,8 @@ public okhttp3.Call getEnvClusterInfoAsync(String appId, final ApiCallback 403 权限不足 - */ - public okhttp3.Call updateAppCall(String appId, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAppCall(String appId, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -1461,23 +1453,18 @@ public okhttp3.Call updateAppCall(String appId, String operator, OpenAppDTO open } @SuppressWarnings("rawtypes") - private okhttp3.Call updateAppValidateBeforeCall(String appId, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateAppValidateBeforeCall(String appId, OpenAppDTO openAppDTO, 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 updateApp(Async)"); } - // verify the required parameter 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling updateApp(Async)"); - } - // verify the required parameter 'openAppDTO' is set if (openAppDTO == null) { throw new ApiException("Missing the required parameter 'openAppDTO' when calling updateApp(Async)"); } - return updateAppCall(appId, operator, openAppDTO, _callback); + return updateAppCall(appId, openAppDTO, operator, _callback); } @@ -1485,9 +1472,9 @@ private okhttp3.Call updateAppValidateBeforeCall(String appId, String operator, * 更新应用(new added) * PUT /openapi/v1/apps/{appId} * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (required) - * @return OpenAppDTO + * @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 @@ -1497,8 +1484,8 @@ private okhttp3.Call updateAppValidateBeforeCall(String appId, String operator,
403 权限不足 -
*/ - public OpenAppDTO updateApp(String appId, String operator, OpenAppDTO openAppDTO) throws ApiException { - ApiResponse localVarResp = updateAppWithHttpInfo(appId, operator, openAppDTO); + public Object updateApp(String appId, OpenAppDTO openAppDTO, String operator) throws ApiException { + ApiResponse localVarResp = updateAppWithHttpInfo(appId, openAppDTO, operator); return localVarResp.getData(); } @@ -1506,9 +1493,9 @@ public OpenAppDTO updateApp(String appId, String operator, OpenAppDTO openAppDTO * 更新应用(new added) * PUT /openapi/v1/apps/{appId} * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (required) - * @return ApiResponse<OpenAppDTO> + * @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 @@ -1518,9 +1505,9 @@ public OpenAppDTO updateApp(String appId, String operator, OpenAppDTO openAppDTO
403 权限不足 -
*/ - public ApiResponse updateAppWithHttpInfo(String appId, String operator, OpenAppDTO openAppDTO) throws ApiException { - okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, operator, openAppDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse updateAppWithHttpInfo(String appId, OpenAppDTO openAppDTO, String operator) throws ApiException { + okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, openAppDTO, operator, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1528,8 +1515,8 @@ public ApiResponse updateAppWithHttpInfo(String appId, String operat * 更新应用(new added) (asynchronously) * PUT /openapi/v1/apps/{appId} * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (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 @@ -1541,10 +1528,10 @@ public ApiResponse updateAppWithHttpInfo(String appId, String operat 403 权限不足 - */ - public okhttp3.Call updateAppAsync(String appId, String operator, OpenAppDTO openAppDTO, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateAppAsync(String appId, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, operator, openAppDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, openAppDTO, operator, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java index 8cd9df6..3276dd1 100644 --- a/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenClusterDTO; import java.lang.reflect.Type; diff --git a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java index 80787b4..cc9855b 100644 --- a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java @@ -28,7 +28,7 @@ import org.openapitools.client.model.OpenInstanceDTO; -import org.openapitools.client.model.OpenPageDTOOpenInstanceDTO; +import org.openapitools.client.model.OpenInstancePageDTO; import java.lang.reflect.Type; import java.util.ArrayList; @@ -74,6 +74,202 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for getByNamespace + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页数 (required) + * @param size 页大小 (required) + * @param instanceAppId Instance表中的AppID (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 -
+ */ + public okhttp3.Call getByNamespaceCall(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId, 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}/instances/by-namespace" + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (appId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); + } + + if (clusterName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("clusterName", clusterName)); + } + + if (namespaceName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("namespaceName", namespaceName)); + } + + if (instanceAppId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("instanceAppId", instanceAppId)); + } + + 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 getByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId, 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 getByNamespace(Async)"); + } + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException("Missing the required parameter 'appId' when calling getByNamespace(Async)"); + } + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException("Missing the required parameter 'clusterName' when calling getByNamespace(Async)"); + } + + // verify the required parameter 'namespaceName' is set + if (namespaceName == null) { + throw new ApiException("Missing the required parameter 'namespaceName' when calling getByNamespace(Async)"); + } + + // verify the required parameter 'page' is set + if (page == null) { + throw new ApiException("Missing the required parameter 'page' when calling getByNamespace(Async)"); + } + + // verify the required parameter 'size' is set + if (size == null) { + throw new ApiException("Missing the required parameter 'size' when calling getByNamespace(Async)"); + } + + return getByNamespaceCall(env, appId, clusterName, namespaceName, page, size, instanceAppId, _callback); + + } + + /** + * 根据namespaceName查询实例(new added) + * + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页数 (required) + * @param size 页大小 (required) + * @param instanceAppId Instance表中的AppID (optional) + * @return OpenInstancePageDTO + * @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 OpenInstancePageDTO getByNamespace(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId) throws ApiException { + ApiResponse localVarResp = getByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName, page, size, instanceAppId); + return localVarResp.getData(); + } + + /** + * 根据namespaceName查询实例(new added) + * + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页数 (required) + * @param size 页大小 (required) + * @param instanceAppId Instance表中的AppID (optional) + * @return ApiResponse<OpenInstancePageDTO> + * @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 getByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId) throws ApiException { + okhttp3.Call localVarCall = getByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, page, size, instanceAppId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 根据namespaceName查询实例(new added) (asynchronously) + * + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页数 (required) + * @param size 页大小 (required) + * @param instanceAppId Instance表中的AppID (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 -
+ */ + public okhttp3.Call getByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, page, size, instanceAppId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getByRelease * @param env (required) @@ -89,7 +285,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 200 - */ - public okhttp3.Call getByReleaseCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getByReleaseCall(String env, Long releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -106,9 +302,8 @@ public okhttp3.Call getByReleaseCall(String env, Integer releaseId, Integer page Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/instances" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); + String localVarPath = "/openapi/v1/envs/{env}/instances/by-release" + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -116,6 +311,10 @@ public okhttp3.Call getByReleaseCall(String env, Integer releaseId, Integer page Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (releaseId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("releaseId", releaseId)); + } + if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } @@ -144,7 +343,7 @@ public okhttp3.Call getByReleaseCall(String env, Integer releaseId, Integer page } @SuppressWarnings("rawtypes") - private okhttp3.Call getByReleaseValidateBeforeCall(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getByReleaseValidateBeforeCall(String env, Long releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { // verify the required parameter 'env' is set if (env == null) { throw new ApiException("Missing the required parameter 'env' when calling getByRelease(Async)"); @@ -171,12 +370,12 @@ private okhttp3.Call getByReleaseValidateBeforeCall(String env, Integer releaseI /** * 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-release * @param env (required) * @param releaseId (required) * @param page (required) * @param size (required) - * @return OpenPageDTOOpenInstanceDTO + * @return OpenInstancePageDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -184,19 +383,19 @@ private okhttp3.Call getByReleaseValidateBeforeCall(String env, Integer releaseI
200 -
*/ - public OpenPageDTOOpenInstanceDTO getByRelease(String env, Integer releaseId, Integer page, Integer size) throws ApiException { - ApiResponse localVarResp = getByReleaseWithHttpInfo(env, releaseId, page, size); + public OpenInstancePageDTO getByRelease(String env, Long releaseId, Integer page, Integer size) throws ApiException { + ApiResponse localVarResp = getByReleaseWithHttpInfo(env, releaseId, page, size); return localVarResp.getData(); } /** * 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-release * @param env (required) * @param releaseId (required) * @param page (required) * @param size (required) - * @return ApiResponse<OpenPageDTOOpenInstanceDTO> + * @return ApiResponse<OpenInstancePageDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -204,15 +403,15 @@ public OpenPageDTOOpenInstanceDTO getByRelease(String env, Integer releaseId, In
200 -
*/ - public ApiResponse getByReleaseWithHttpInfo(String env, Integer releaseId, Integer page, Integer size) throws ApiException { + public ApiResponse getByReleaseWithHttpInfo(String env, Long releaseId, Integer page, Integer size) throws ApiException { okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 根据发布版本查询实例(支持分页) (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-release * @param env (required) * @param releaseId (required) * @param page (required) @@ -226,20 +425,20 @@ public ApiResponse getByReleaseWithHttpInfo(String e 200 - */ - public okhttp3.Call getByReleaseAsync(String env, Integer releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getByReleaseAsync(String env, Long releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getByReleasesNotIn + * Build call for getByReleasesAndNamespaceNotIn * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) + * @param releaseIds 排除的发布ID列表,用逗号分隔 (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -249,7 +448,7 @@ public okhttp3.Call getByReleaseAsync(String env, Integer releaseId, Integer pag 200 - */ - public okhttp3.Call getByReleasesNotInCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getByReleasesAndNamespaceNotInCall(String env, String appId, String clusterName, String namespaceName, String releaseIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -266,11 +465,8 @@ public okhttp3.Call getByReleasesNotInCall(String env, String appId, String clus Object localVarPostBody = null; // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); + String localVarPath = "/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in" + .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -278,8 +474,20 @@ public okhttp3.Call getByReleasesNotInCall(String env, String appId, String clus Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (excludeReleases != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("excludeReleases", excludeReleases)); + if (appId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); + } + + if (clusterName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("clusterName", clusterName)); + } + + if (namespaceName != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("namespaceName", namespaceName)); + } + + if (releaseIds != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("releaseIds", releaseIds)); } final String[] localVarAccepts = { @@ -302,39 +510,39 @@ public okhttp3.Call getByReleasesNotInCall(String env, String appId, String clus } @SuppressWarnings("rawtypes") - private okhttp3.Call getByReleasesNotInValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getByReleasesAndNamespaceNotInValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String releaseIds, 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 getByReleasesNotIn(Async)"); + throw new ApiException("Missing the required parameter 'env' when calling getByReleasesAndNamespaceNotIn(Async)"); } // verify the required parameter 'appId' is set if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getByReleasesNotIn(Async)"); + throw new ApiException("Missing the required parameter 'appId' when calling getByReleasesAndNamespaceNotIn(Async)"); } // verify the required parameter 'clusterName' is set if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getByReleasesNotIn(Async)"); + throw new ApiException("Missing the required parameter 'clusterName' when calling getByReleasesAndNamespaceNotIn(Async)"); } // verify the required parameter 'namespaceName' is set if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getByReleasesNotIn(Async)"); + throw new ApiException("Missing the required parameter 'namespaceName' when calling getByReleasesAndNamespaceNotIn(Async)"); } - return getByReleasesNotInCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); + return getByReleasesAndNamespaceNotInCall(env, appId, clusterName, namespaceName, releaseIds, _callback); } /** * 查询不在指定发布版本中的实例 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + * * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) + * @param releaseIds 排除的发布ID列表,用逗号分隔 (optional) * @return List<OpenInstanceDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -343,19 +551,19 @@ private okhttp3.Call getByReleasesNotInValidateBeforeCall(String env, String app 200 - */ - public List getByReleasesNotIn(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { - ApiResponse> localVarResp = getByReleasesNotInWithHttpInfo(env, appId, clusterName, namespaceName, excludeReleases); + public List getByReleasesAndNamespaceNotIn(String env, String appId, String clusterName, String namespaceName, String releaseIds) throws ApiException { + ApiResponse> localVarResp = getByReleasesAndNamespaceNotInWithHttpInfo(env, appId, clusterName, namespaceName, releaseIds); return localVarResp.getData(); } /** * 查询不在指定发布版本中的实例 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + * * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) + * @param releaseIds 排除的发布ID列表,用逗号分隔 (optional) * @return ApiResponse<List<OpenInstanceDTO>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -364,20 +572,20 @@ public List getByReleasesNotIn(String env, String appId, String 200 - */ - public ApiResponse> getByReleasesNotInWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String excludeReleases) throws ApiException { - okhttp3.Call localVarCall = getByReleasesNotInValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, null); + public ApiResponse> getByReleasesAndNamespaceNotInWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String releaseIds) throws ApiException { + okhttp3.Call localVarCall = getByReleasesAndNamespaceNotInValidateBeforeCall(env, appId, clusterName, namespaceName, releaseIds, 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}/instances?excludeReleases=1,2,3 + * * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) + * @param releaseIds 排除的发布ID列表,用逗号分隔 (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -387,9 +595,9 @@ public ApiResponse> getByReleasesNotInWithHttpInfo(String 200 - */ - public okhttp3.Call getByReleasesNotInAsync(String env, String appId, String clusterName, String namespaceName, String excludeReleases, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getByReleasesAndNamespaceNotInAsync(String env, String appId, String clusterName, String namespaceName, String releaseIds, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getByReleasesNotInValidateBeforeCall(env, appId, clusterName, namespaceName, excludeReleases, _callback); + okhttp3.Call localVarCall = getByReleasesAndNamespaceNotInValidateBeforeCall(env, appId, clusterName, namespaceName, releaseIds, _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 23134e0..9d1c87f 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 @@ -27,11 +27,12 @@ import java.io.IOException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenItemDTO; import org.openapitools.client.model.OpenItemDiffs; +import org.openapitools.client.model.OpenItemPageDTO; import org.openapitools.client.model.OpenNamespaceSyncModel; import org.openapitools.client.model.OpenNamespaceTextModel; -import org.openapitools.client.model.OpenPageDTOOpenItemDTO; import java.lang.reflect.Type; import java.util.ArrayList; @@ -1075,7 +1076,7 @@ private okhttp3.Call findItemsByNamespaceValidateBeforeCall(String appId, String * @param namespaceName 命名空间名称 (required) * @param page 页码,从0开始 (required) * @param size 每页数量 (required) - * @return OpenPageDTOOpenItemDTO + * @return OpenItemPageDTO * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1084,8 +1085,8 @@ private okhttp3.Call findItemsByNamespaceValidateBeforeCall(String appId, String
404 命名空间不存在 -
*/ - public OpenPageDTOOpenItemDTO 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 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(); } @@ -1098,7 +1099,7 @@ public OpenPageDTOOpenItemDTO findItemsByNamespace(String appId, String env, Str * @param namespaceName 命名空间名称 (required) * @param page 页码,从0开始 (required) * @param size 每页数量 (required) - * @return ApiResponse<OpenPageDTOOpenItemDTO> + * @return ApiResponse<OpenItemPageDTO> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1107,9 +1108,9 @@ public OpenPageDTOOpenItemDTO findItemsByNamespace(String appId, String env, Str
404 命名空间不存在 -
*/ - public ApiResponse findItemsByNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { + 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(); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1132,10 +1133,10 @@ public ApiResponse findItemsByNamespaceWithHttpInfo(Stri 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 findItemsByNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java index a62a656..c138b2f 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 @@ -27,6 +27,7 @@ import java.io.IOException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.NamespaceReleaseDTO; import org.openapitools.client.model.OpenGrayReleaseRuleDTO; import org.openapitools.client.model.OpenNamespaceDTO; 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 1886b81..0f78551 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,6 +27,7 @@ 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.OpenNamespaceLockDTO; diff --git a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java index 97f60ca..5f8da41 100644 --- a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java +++ b/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenOrganizationDto; import java.lang.reflect.Type; 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 4076dfa..c7fde5d 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 @@ -27,6 +27,7 @@ import java.io.IOException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; import org.openapitools.client.model.NamespaceReleaseDTO; import org.openapitools.client.model.OpenReleaseBO; diff --git a/java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java b/java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java new file mode 100644 index 0000000..c8b8d33 --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java @@ -0,0 +1,295 @@ +/* + * 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.time.OffsetDateTime; + +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; + +/** + * ExceptionResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ExceptionResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private Integer status; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; + @SerializedName(SERIALIZED_NAME_TIMESTAMP) + private OffsetDateTime timestamp; + + public static final String SERIALIZED_NAME_EXCEPTION = "exception"; + @SerializedName(SERIALIZED_NAME_EXCEPTION) + private String exception; + + public ExceptionResponse() { + } + + public ExceptionResponse status(Integer status) { + + this.status = status; + return this; + } + + /** + * HTTP 状态码 + * @return status + **/ + @javax.annotation.Nullable + public Integer getStatus() { + return status; + } + + + public void setStatus(Integer status) { + this.status = status; + } + + + public ExceptionResponse 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 ExceptionResponse timestamp(OffsetDateTime timestamp) { + + this.timestamp = timestamp; + return this; + } + + /** + * 时间戳 + * @return timestamp + **/ + @javax.annotation.Nullable + public OffsetDateTime getTimestamp() { + return timestamp; + } + + + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + + public ExceptionResponse exception(String exception) { + + this.exception = exception; + return this; + } + + /** + * 错误类名 + * @return exception + **/ + @javax.annotation.Nullable + public String getException() { + return exception; + } + + + public void setException(String exception) { + this.exception = exception; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExceptionResponse exceptionResponse = (ExceptionResponse) o; + return Objects.equals(this.status, exceptionResponse.status) && + Objects.equals(this.message, exceptionResponse.message) && + Objects.equals(this.timestamp, exceptionResponse.timestamp) && + Objects.equals(this.exception, exceptionResponse.exception); + } + + @Override + public int hashCode() { + return Objects.hash(status, message, timestamp, exception); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExceptionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("message"); + openapiFields.add("timestamp"); + openapiFields.add("exception"); + + // 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 ExceptionResponse + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!ExceptionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ExceptionResponse is not found in the empty JSON string", ExceptionResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!ExceptionResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExceptionResponse` 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())); + } + if ((jsonObj.get("exception") != null && !jsonObj.get("exception").isJsonNull()) && !jsonObj.get("exception").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `exception` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exception").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ExceptionResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ExceptionResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ExceptionResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ExceptionResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ExceptionResponse read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ExceptionResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ExceptionResponse + * @throws IOException if the JSON string is invalid with respect to ExceptionResponse + */ + public static ExceptionResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ExceptionResponse.class); + } + + /** + * Convert an instance of ExceptionResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java index 3ac83d6..dcbd8b7 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java @@ -92,6 +92,10 @@ public class OpenAppDTO { @SerializedName(SERIALIZED_NAME_OWNER_EMAIL) private String ownerEmail; + public static final String SERIALIZED_NAME_OWNER_DISPLAY_NAME = "ownerDisplayName"; + @SerializedName(SERIALIZED_NAME_OWNER_DISPLAY_NAME) + private String ownerDisplayName; + public OpenAppDTO() { } @@ -305,6 +309,27 @@ public void setOwnerEmail(String ownerEmail) { } + public OpenAppDTO ownerDisplayName(String ownerDisplayName) { + + this.ownerDisplayName = ownerDisplayName; + return this; + } + + /** + * Get ownerDisplayName + * @return ownerDisplayName + **/ + @javax.annotation.Nullable + public String getOwnerDisplayName() { + return ownerDisplayName; + } + + + public void setOwnerDisplayName(String ownerDisplayName) { + this.ownerDisplayName = ownerDisplayName; + } + + @Override public boolean equals(Object o) { @@ -324,12 +349,13 @@ public boolean equals(Object o) { Objects.equals(this.orgId, openAppDTO.orgId) && Objects.equals(this.orgName, openAppDTO.orgName) && Objects.equals(this.ownerName, openAppDTO.ownerName) && - Objects.equals(this.ownerEmail, openAppDTO.ownerEmail); + Objects.equals(this.ownerEmail, openAppDTO.ownerEmail) && + Objects.equals(this.ownerDisplayName, openAppDTO.ownerDisplayName); } @Override public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail); + return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail, ownerDisplayName); } @Override @@ -346,6 +372,7 @@ public String toString() { sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); sb.append(" ownerEmail: ").append(toIndentedString(ownerEmail)).append("\n"); + sb.append(" ownerDisplayName: ").append(toIndentedString(ownerDisplayName)).append("\n"); sb.append("}"); return sb.toString(); } @@ -378,6 +405,7 @@ private String toIndentedString(Object o) { openapiFields.add("orgName"); openapiFields.add("ownerName"); openapiFields.add("ownerEmail"); + openapiFields.add("ownerDisplayName"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -433,6 +461,9 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if ((jsonObj.get("ownerEmail") != null && !jsonObj.get("ownerEmail").isJsonNull()) && !jsonObj.get("ownerEmail").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `ownerEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerEmail").toString())); } + if ((jsonObj.get("ownerDisplayName") != null && !jsonObj.get("ownerDisplayName").isJsonNull()) && !jsonObj.get("ownerDisplayName").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `ownerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerDisplayName").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java index cbd46c0..c4c624a 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.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.OpenAppDTO; import com.google.gson.Gson; @@ -61,7 +61,7 @@ public class OpenCreateAppDTO { public static final String SERIALIZED_NAME_ADMINS = "admins"; @SerializedName(SERIALIZED_NAME_ADMINS) - private List admins; + private Set admins; public static final String SERIALIZED_NAME_APP = "app"; @SerializedName(SERIALIZED_NAME_APP) @@ -91,7 +91,7 @@ public void setAssignAppRoleToSelf(Boolean assignAppRoleToSelf) { } - public OpenCreateAppDTO admins(List admins) { + public OpenCreateAppDTO admins(Set admins) { this.admins = admins; return this; @@ -99,7 +99,7 @@ public OpenCreateAppDTO admins(List admins) { public OpenCreateAppDTO addAdminsItem(String adminsItem) { if (this.admins == null) { - this.admins = new ArrayList<>(); + this.admins = new LinkedHashSet<>(); } this.admins.add(adminsItem); return this; @@ -110,12 +110,12 @@ public OpenCreateAppDTO addAdminsItem(String adminsItem) { * @return admins **/ @javax.annotation.Nullable - public List getAdmins() { + public Set getAdmins() { return admins; } - public void setAdmins(List admins) { + public void setAdmins(Set admins) { this.admins = admins; } diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java index b1910f8..02a91f5 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java @@ -55,6 +55,14 @@ */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class OpenEnvClusterInfo { + 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_ENV = "env"; @SerializedName(SERIALIZED_NAME_ENV) private String env; @@ -66,6 +74,48 @@ public class OpenEnvClusterInfo { public OpenEnvClusterInfo() { } + public OpenEnvClusterInfo 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 OpenEnvClusterInfo 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 OpenEnvClusterInfo env(String env) { this.env = env; @@ -126,19 +176,23 @@ public boolean equals(Object o) { return false; } OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; - return Objects.equals(this.env, openEnvClusterInfo.env) && + return Objects.equals(this.code, openEnvClusterInfo.code) && + Objects.equals(this.message, openEnvClusterInfo.message) && + Objects.equals(this.env, openEnvClusterInfo.env) && Objects.equals(this.clusters, openEnvClusterInfo.clusters); } @Override public int hashCode() { - return Objects.hash(env, clusters); + return Objects.hash(code, message, env, clusters); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenEnvClusterInfo {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); sb.append("}"); @@ -163,6 +217,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("message"); openapiFields.add("env"); openapiFields.add("clusters"); @@ -190,6 +246,9 @@ 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 `OpenEnvClusterInfo` 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())); + } 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())); } diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java similarity index 65% rename from java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java rename to java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java index 0a1d471..3406457 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java @@ -54,7 +54,7 @@ * 分页实例数据传输对象,用于返回分页查询的实例列表结果 */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenPageDTOOpenInstanceDTO { +public class OpenInstancePageDTO { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) private Integer page; @@ -67,14 +67,14 @@ public class OpenPageDTOOpenInstanceDTO { @SerializedName(SERIALIZED_NAME_TOTAL) private Long total; - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private List content; + public static final String SERIALIZED_NAME_INSTANCES = "instances"; + @SerializedName(SERIALIZED_NAME_INSTANCES) + private List instances; - public OpenPageDTOOpenInstanceDTO() { + public OpenInstancePageDTO() { } - public OpenPageDTOOpenInstanceDTO page(Integer page) { + public OpenInstancePageDTO page(Integer page) { this.page = page; return this; @@ -95,7 +95,7 @@ public void setPage(Integer page) { } - public OpenPageDTOOpenInstanceDTO size(Integer size) { + public OpenInstancePageDTO size(Integer size) { this.size = size; return this; @@ -116,7 +116,7 @@ public void setSize(Integer size) { } - public OpenPageDTOOpenInstanceDTO total(Long total) { + public OpenInstancePageDTO total(Long total) { this.total = total; return this; @@ -137,32 +137,32 @@ public void setTotal(Long total) { } - public OpenPageDTOOpenInstanceDTO content(List content) { + public OpenInstancePageDTO instances(List instances) { - this.content = content; + this.instances = instances; return this; } - public OpenPageDTOOpenInstanceDTO addContentItem(OpenInstanceDTO contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); + public OpenInstancePageDTO addInstancesItem(OpenInstanceDTO instancesItem) { + if (this.instances == null) { + this.instances = new ArrayList<>(); } - this.content.add(contentItem); + this.instances.add(instancesItem); return this; } /** * 当前页的实例列表,包含具体的实例数据 - * @return content + * @return instances **/ @javax.annotation.Nullable - public List getContent() { - return content; + public List getInstances() { + return instances; } - public void setContent(List content) { - this.content = content; + public void setInstances(List instances) { + this.instances = instances; } @@ -175,26 +175,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenPageDTOOpenInstanceDTO openPageDTOOpenInstanceDTO = (OpenPageDTOOpenInstanceDTO) o; - return Objects.equals(this.page, openPageDTOOpenInstanceDTO.page) && - Objects.equals(this.size, openPageDTOOpenInstanceDTO.size) && - Objects.equals(this.total, openPageDTOOpenInstanceDTO.total) && - Objects.equals(this.content, openPageDTOOpenInstanceDTO.content); + OpenInstancePageDTO openInstancePageDTO = (OpenInstancePageDTO) o; + return Objects.equals(this.page, openInstancePageDTO.page) && + Objects.equals(this.size, openInstancePageDTO.size) && + Objects.equals(this.total, openInstancePageDTO.total) && + Objects.equals(this.instances, openInstancePageDTO.instances); } @Override public int hashCode() { - return Objects.hash(page, size, total, content); + return Objects.hash(page, size, total, instances); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenPageDTOOpenInstanceDTO {\n"); + sb.append("class OpenInstancePageDTO {\n"); sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); sb.append("}"); return sb.toString(); } @@ -220,7 +220,7 @@ private String toIndentedString(Object o) { openapiFields.add("page"); openapiFields.add("size"); openapiFields.add("total"); - openapiFields.add("content"); + openapiFields.add("instances"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -230,33 +230,33 @@ 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 OpenPageDTOOpenInstanceDTO + * @throws IOException if the JSON Object is invalid with respect to OpenInstancePageDTO */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!OpenPageDTOOpenInstanceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenPageDTOOpenInstanceDTO is not found in the empty JSON string", OpenPageDTOOpenInstanceDTO.openapiRequiredFields.toString())); + if (!OpenInstancePageDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenInstancePageDTO is not found in the empty JSON string", OpenInstancePageDTO.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!OpenPageDTOOpenInstanceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenPageDTOOpenInstanceDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!OpenInstancePageDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstancePageDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } - if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { - JsonArray jsonArraycontent = jsonObj.getAsJsonArray("content"); - if (jsonArraycontent != null) { + if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonNull()) { + JsonArray jsonArrayinstances = jsonObj.getAsJsonArray("instances"); + if (jsonArrayinstances != null) { // ensure the json data is an array - if (!jsonObj.get("content").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `content` to be an array in the JSON string but got `%s`", jsonObj.get("content").toString())); + if (!jsonObj.get("instances").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); } - // validate the optional field `content` (array) - for (int i = 0; i < jsonArraycontent.size(); i++) { - OpenInstanceDTO.validateJsonObject(jsonArraycontent.get(i).getAsJsonObject()); + // validate the optional field `instances` (array) + for (int i = 0; i < jsonArrayinstances.size(); i++) { + OpenInstanceDTO.validateJsonObject(jsonArrayinstances.get(i).getAsJsonObject()); }; } } @@ -266,22 +266,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenPageDTOOpenInstanceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenPageDTOOpenInstanceDTO' and its subtypes + if (!OpenInstancePageDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenInstancePageDTO' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenPageDTOOpenInstanceDTO.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenInstancePageDTO.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, OpenPageDTOOpenInstanceDTO value) throws IOException { + public void write(JsonWriter out, OpenInstancePageDTO value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public OpenPageDTOOpenInstanceDTO read(JsonReader in) throws IOException { + public OpenInstancePageDTO read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -292,18 +292,18 @@ public OpenPageDTOOpenInstanceDTO read(JsonReader in) throws IOException { } /** - * Create an instance of OpenPageDTOOpenInstanceDTO given an JSON string + * Create an instance of OpenInstancePageDTO given an JSON string * * @param jsonString JSON string - * @return An instance of OpenPageDTOOpenInstanceDTO - * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenInstanceDTO + * @return An instance of OpenInstancePageDTO + * @throws IOException if the JSON string is invalid with respect to OpenInstancePageDTO */ - public static OpenPageDTOOpenInstanceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenPageDTOOpenInstanceDTO.class); + public static OpenInstancePageDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenInstancePageDTO.class); } /** - * Convert an instance of OpenPageDTOOpenInstanceDTO to an JSON string + * Convert an instance of OpenInstancePageDTO to an JSON string * * @return JSON string */ diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java similarity index 78% rename from java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java rename to java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java index 2144be4..3a891ab 100644 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPageDTOOpenItemDTO.java +++ b/java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java @@ -54,7 +54,7 @@ * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenPageDTOOpenItemDTO { +public class OpenItemPageDTO { public static final String SERIALIZED_NAME_PAGE = "page"; @SerializedName(SERIALIZED_NAME_PAGE) private Integer page; @@ -71,10 +71,10 @@ public class OpenPageDTOOpenItemDTO { @SerializedName(SERIALIZED_NAME_CONTENT) private List content; - public OpenPageDTOOpenItemDTO() { + public OpenItemPageDTO() { } - public OpenPageDTOOpenItemDTO page(Integer page) { + public OpenItemPageDTO page(Integer page) { this.page = page; return this; @@ -95,7 +95,7 @@ public void setPage(Integer page) { } - public OpenPageDTOOpenItemDTO size(Integer size) { + public OpenItemPageDTO size(Integer size) { this.size = size; return this; @@ -116,7 +116,7 @@ public void setSize(Integer size) { } - public OpenPageDTOOpenItemDTO total(Long total) { + public OpenItemPageDTO total(Long total) { this.total = total; return this; @@ -137,13 +137,13 @@ public void setTotal(Long total) { } - public OpenPageDTOOpenItemDTO content(List content) { + public OpenItemPageDTO content(List content) { this.content = content; return this; } - public OpenPageDTOOpenItemDTO addContentItem(OpenItemDTO contentItem) { + public OpenItemPageDTO addContentItem(OpenItemDTO contentItem) { if (this.content == null) { this.content = new ArrayList<>(); } @@ -175,11 +175,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenPageDTOOpenItemDTO openPageDTOOpenItemDTO = (OpenPageDTOOpenItemDTO) o; - return Objects.equals(this.page, openPageDTOOpenItemDTO.page) && - Objects.equals(this.size, openPageDTOOpenItemDTO.size) && - Objects.equals(this.total, openPageDTOOpenItemDTO.total) && - Objects.equals(this.content, openPageDTOOpenItemDTO.content); + OpenItemPageDTO openItemPageDTO = (OpenItemPageDTO) o; + return Objects.equals(this.page, openItemPageDTO.page) && + Objects.equals(this.size, openItemPageDTO.size) && + Objects.equals(this.total, openItemPageDTO.total) && + Objects.equals(this.content, openItemPageDTO.content); } @Override @@ -190,7 +190,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenPageDTOOpenItemDTO {\n"); + sb.append("class OpenItemPageDTO {\n"); sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" total: ").append(toIndentedString(total)).append("\n"); @@ -230,20 +230,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 OpenPageDTOOpenItemDTO + * @throws IOException if the JSON Object is invalid with respect to OpenItemPageDTO */ public static void validateJsonObject(JsonObject jsonObj) throws IOException { if (jsonObj == null) { - if (!OpenPageDTOOpenItemDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenPageDTOOpenItemDTO is not found in the empty JSON string", OpenPageDTOOpenItemDTO.openapiRequiredFields.toString())); + if (!OpenItemPageDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemPageDTO is not found in the empty JSON string", OpenItemPageDTO.openapiRequiredFields.toString())); } } Set> entries = jsonObj.entrySet(); // check to see if the JSON string contains additional fields for (Entry entry : entries) { - if (!OpenPageDTOOpenItemDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenPageDTOOpenItemDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); + if (!OpenItemPageDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemPageDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); } } if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { @@ -266,22 +266,22 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenPageDTOOpenItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenPageDTOOpenItemDTO' and its subtypes + if (!OpenItemPageDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenItemPageDTO' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenPageDTOOpenItemDTO.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenItemPageDTO.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, OpenPageDTOOpenItemDTO value) throws IOException { + public void write(JsonWriter out, OpenItemPageDTO value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); elementAdapter.write(out, obj); } @Override - public OpenPageDTOOpenItemDTO read(JsonReader in) throws IOException { + public OpenItemPageDTO read(JsonReader in) throws IOException { JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); validateJsonObject(jsonObj); return thisAdapter.fromJsonTree(jsonObj); @@ -292,18 +292,18 @@ public OpenPageDTOOpenItemDTO read(JsonReader in) throws IOException { } /** - * Create an instance of OpenPageDTOOpenItemDTO given an JSON string + * Create an instance of OpenItemPageDTO given an JSON string * * @param jsonString JSON string - * @return An instance of OpenPageDTOOpenItemDTO - * @throws IOException if the JSON string is invalid with respect to OpenPageDTOOpenItemDTO + * @return An instance of OpenItemPageDTO + * @throws IOException if the JSON string is invalid with respect to OpenItemPageDTO */ - public static OpenPageDTOOpenItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenPageDTOOpenItemDTO.class); + public static OpenItemPageDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenItemPageDTO.class); } /** - * Convert an instance of OpenPageDTOOpenItemDTO to an JSON string + * Convert an instance of OpenItemPageDTO to an JSON string * * @return JSON string */ diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java new file mode 100644 index 0000000..84c52fe --- /dev/null +++ b/java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java @@ -0,0 +1,235 @@ +/* + * 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; + +/** + * OpenMissEnvDTO + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OpenMissEnvDTO { + 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 OpenMissEnvDTO() { + } + + public OpenMissEnvDTO 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 OpenMissEnvDTO message(String message) { + + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + + public void setMessage(String message) { + this.message = message; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenMissEnvDTO openMissEnvDTO = (OpenMissEnvDTO) o; + return Objects.equals(this.code, openMissEnvDTO.code) && + Objects.equals(this.message, openMissEnvDTO.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenMissEnvDTO {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("code"); + openapiFields.add("message"); + + // 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 OpenMissEnvDTO + */ + public static void validateJsonObject(JsonObject jsonObj) throws IOException { + if (jsonObj == null) { + if (!OpenMissEnvDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OpenMissEnvDTO is not found in the empty JSON string", OpenMissEnvDTO.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonObj.entrySet(); + // check to see if the JSON string contains additional fields + for (Entry entry : entries) { + if (!OpenMissEnvDTO.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenMissEnvDTO` 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())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OpenMissEnvDTO.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OpenMissEnvDTO' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OpenMissEnvDTO.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OpenMissEnvDTO value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OpenMissEnvDTO read(JsonReader in) throws IOException { + JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); + validateJsonObject(jsonObj); + return thisAdapter.fromJsonTree(jsonObj); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OpenMissEnvDTO given an JSON string + * + * @param jsonString JSON string + * @return An instance of OpenMissEnvDTO + * @throws IOException if the JSON string is invalid with respect to OpenMissEnvDTO + */ + public static OpenMissEnvDTO fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OpenMissEnvDTO.class); + } + + /** + * Convert an instance of OpenMissEnvDTO 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 92e8fdc..4f1d006 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 @@ -14,10 +14,12 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; -import org.openapitools.client.model.MultiResponseEntity; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenAppDTO; import org.openapitools.client.model.OpenCreateAppDTO; import org.openapitools.client.model.OpenEnvClusterDTO; +import org.openapitools.client.model.OpenEnvClusterInfo; +import org.openapitools.client.model.OpenMissEnvDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -44,7 +46,7 @@ public class AppManagementApiTest { @Test public void createAppTest() throws ApiException { OpenCreateAppDTO openCreateAppDTO = null; - Object response = api.createApp(openCreateAppDTO); + OpenAppDTO response = api.createApp(openCreateAppDTO); // TODO: test validations } @@ -58,9 +60,9 @@ public void createAppTest() throws ApiException { @Test public void createAppInEnvTest() throws ApiException { String env = null; - String operator = null; OpenAppDTO openAppDTO = null; - Object response = api.createAppInEnv(env, operator, openAppDTO); + String operator = null; + Object response = api.createAppInEnv(env, openAppDTO, operator); // TODO: test validations } @@ -109,14 +111,14 @@ public void findAppsAuthorizedTest() throws ApiException { /** * 查找缺失的环境(new added) * - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs * * @throws ApiException if the Api call fails */ @Test public void findMissEnvsTest() throws ApiException { String appId = null; - MultiResponseEntity response = api.findMissEnvs(appId); + List response = api.findMissEnvs(appId); // TODO: test validations } @@ -135,45 +137,45 @@ public void getAppTest() throws ApiException { } /** - * 获取应用导航树(new added) + * 获取当前Consumer/User的应用列表(分页)(new added) * - * GET /openapi/v1/apps/{appId}/navtree + * GET /openapi/v1/apps/by-self * * @throws ApiException if the Api call fails */ @Test - public void getAppNavTreeTest() throws ApiException { - String appId = null; - MultiResponseEntity response = api.getAppNavTree(appId); + public void getAppsBySelfTest() throws ApiException { + Integer page = null; + Integer size = null; + List response = api.getAppsBySelf(page, size); // TODO: test validations } /** - * 获取当前Consumer的应用列表(分页)(new added) + * 获取应用环境集群详情(new added) * - * GET /openapi/v1/apps/by-self + * /openapi/v1/apps/{appId}/env-cluster-info * * @throws ApiException if the Api call fails */ @Test - public void getAppsBySelfTest() throws ApiException { - Integer page = null; - Integer size = null; - List response = api.getAppsBySelf(page, size); + public void getEnvClusterInfoTest() throws ApiException { + String appId = null; + List response = api.getEnvClusterInfo(appId); // TODO: test validations } /** * 获取应用的环境集群信息 (original openapi) * - * GET /openapi/v1/apps/{appId}/envclusters + * GET /openapi/v1/apps/{appId}/envClusters * * @throws ApiException if the Api call fails */ @Test - public void getEnvClusterInfoTest() throws ApiException { + public void getEnvClustersTest() throws ApiException { String appId = null; - List response = api.getEnvClusterInfo(appId); + List response = api.getEnvClusters(appId); // TODO: test validations } @@ -187,9 +189,9 @@ public void getEnvClusterInfoTest() throws ApiException { @Test public void updateAppTest() throws ApiException { String appId = null; - String operator = null; OpenAppDTO openAppDTO = null; - OpenAppDTO response = api.updateApp(appId, operator, openAppDTO); + String operator = null; + Object response = api.updateApp(appId, openAppDTO, operator); // TODO: test validations } diff --git a/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java index 682bce3..1ccc323 100644 --- a/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenClusterDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java index 906a4ac..392685e 100644 --- a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java @@ -15,7 +15,7 @@ import org.openapitools.client.ApiException; import org.openapitools.client.model.OpenInstanceDTO; -import org.openapitools.client.model.OpenPageDTOOpenInstanceDTO; +import org.openapitools.client.model.OpenInstancePageDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -32,38 +32,54 @@ public class InstanceManagementApiTest { private final InstanceManagementApi api = new InstanceManagementApi(); + /** + * 根据namespaceName查询实例(new added) + * + * @throws ApiException if the Api call fails + */ + @Test + public void getByNamespaceTest() throws ApiException { + String env = null; + String appId = null; + String clusterName = null; + String namespaceName = null; + Integer page = null; + Integer size = null; + String instanceAppId = null; + OpenInstancePageDTO response = api.getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId); + // TODO: test validations + } + /** * 根据发布版本查询实例(支持分页) (new added) * - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-release * * @throws ApiException if the Api call fails */ @Test public void getByReleaseTest() throws ApiException { String env = null; - Integer releaseId = null; + Long releaseId = null; Integer page = null; Integer size = null; - OpenPageDTOOpenInstanceDTO response = api.getByRelease(env, releaseId, page, size); + OpenInstancePageDTO response = api.getByRelease(env, releaseId, page, size); // TODO: test validations } /** * 查询不在指定发布版本中的实例 (new added) * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - * * @throws ApiException if the Api call fails */ @Test - public void getByReleasesNotInTest() throws ApiException { + public void getByReleasesAndNamespaceNotInTest() throws ApiException { String env = null; String appId = null; String clusterName = null; String namespaceName = null; - String excludeReleases = null; - List response = api.getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases); + String releaseIds = null; + List response = api.getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds); // 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 958da28..0a4247f 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 @@ -14,11 +14,12 @@ package org.openapitools.client.api; 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.OpenItemPageDTO; import org.openapitools.client.model.OpenNamespaceSyncModel; import org.openapitools.client.model.OpenNamespaceTextModel; -import org.openapitools.client.model.OpenPageDTOOpenItemDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -144,7 +145,7 @@ public void findItemsByNamespaceTest() throws ApiException { String namespaceName = null; Integer page = null; Integer size = null; - OpenPageDTOOpenItemDTO response = api.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); + OpenItemPageDTO response = api.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); // 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 618d110..fddf92a 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 @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.NamespaceReleaseDTO; import org.openapitools.client.model.OpenGrayReleaseRuleDTO; import org.openapitools.client.model.OpenNamespaceDTO; 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 8d6c8ad..e4aa526 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,6 +14,7 @@ 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.OpenNamespaceLockDTO; diff --git a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java index fd600d2..1a28450 100644 --- a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java +++ b/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.OpenOrganizationDto; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; 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 8fbaa67..705f1be 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 @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import org.openapitools.client.model.ExceptionResponse; import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; import org.openapitools.client.model.NamespaceReleaseDTO; import org.openapitools.client.model.OpenReleaseBO; diff --git a/java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java new file mode 100644 index 0000000..5734fa5 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java @@ -0,0 +1,73 @@ +/* + * 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.time.OffsetDateTime; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for ExceptionResponse + */ +public class ExceptionResponseTest { + private final ExceptionResponse model = new ExceptionResponse(); + + /** + * Model tests for ExceptionResponse + */ + @Test + public void testExceptionResponse() { + // TODO: test ExceptionResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'timestamp' + */ + @Test + public void timestampTest() { + // TODO: test timestamp + } + + /** + * Test the property 'exception' + */ + @Test + public void exceptionTest() { + // TODO: test exception + } + +} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java index db6d30e..90a5164 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java @@ -117,4 +117,12 @@ public void ownerEmailTest() { // TODO: test ownerEmail } + /** + * Test the property 'ownerDisplayName' + */ + @Test + public void ownerDisplayNameTest() { + // TODO: test ownerDisplayName + } + } diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java index 1b5a015..e204641 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.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.OpenAppDTO; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java index 82b4e32..cbbec1b 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java @@ -40,6 +40,22 @@ public void testOpenEnvClusterInfo() { // TODO: test OpenEnvClusterInfo } + /** + * 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 'env' */ diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java similarity index 81% rename from java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java index 8fba79d..b7a44ed 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenInstanceDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java @@ -27,17 +27,17 @@ /** - * Model tests for OpenPageDTOOpenInstanceDTO + * Model tests for OpenInstancePageDTO */ -public class OpenPageDTOOpenInstanceDTOTest { - private final OpenPageDTOOpenInstanceDTO model = new OpenPageDTOOpenInstanceDTO(); +public class OpenInstancePageDTOTest { + private final OpenInstancePageDTO model = new OpenInstancePageDTO(); /** - * Model tests for OpenPageDTOOpenInstanceDTO + * Model tests for OpenInstancePageDTO */ @Test - public void testOpenPageDTOOpenInstanceDTO() { - // TODO: test OpenPageDTOOpenInstanceDTO + public void testOpenInstancePageDTO() { + // TODO: test OpenInstancePageDTO } /** @@ -65,11 +65,11 @@ public void totalTest() { } /** - * Test the property 'content' + * Test the property 'instances' */ @Test - public void contentTest() { - // TODO: test content + public void instancesTest() { + // TODO: test instances } } diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java similarity index 86% rename from java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java rename to java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java index 17be752..e8ee5ba 100644 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPageDTOOpenItemDTOTest.java +++ b/java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java @@ -27,17 +27,17 @@ /** - * Model tests for OpenPageDTOOpenItemDTO + * Model tests for OpenItemPageDTO */ -public class OpenPageDTOOpenItemDTOTest { - private final OpenPageDTOOpenItemDTO model = new OpenPageDTOOpenItemDTO(); +public class OpenItemPageDTOTest { + private final OpenItemPageDTO model = new OpenItemPageDTO(); /** - * Model tests for OpenPageDTOOpenItemDTO + * Model tests for OpenItemPageDTO */ @Test - public void testOpenPageDTOOpenItemDTO() { - // TODO: test OpenPageDTOOpenItemDTO + public void testOpenItemPageDTO() { + // TODO: test OpenItemPageDTO } /** diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java new file mode 100644 index 0000000..1040597 --- /dev/null +++ b/java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java @@ -0,0 +1,56 @@ +/* + * 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 OpenMissEnvDTO + */ +public class OpenMissEnvDTOTest { + private final OpenMissEnvDTO model = new OpenMissEnvDTO(); + + /** + * Model tests for OpenMissEnvDTO + */ + @Test + public void testOpenMissEnvDTO() { + // TODO: test OpenMissEnvDTO + } + + /** + * Test the property 'code' + */ + @Test + public void codeTest() { + // TODO: test code + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + +} diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES index 970aae7..1d80d98 100644 --- a/python/.openapi-generator/FILES +++ b/python/.openapi-generator/FILES @@ -50,12 +50,18 @@ apollo_openapi/model/open_instance_config_dto.py apollo_openapi/model/open_instance_config_dto.pyi apollo_openapi/model/open_instance_dto.py apollo_openapi/model/open_instance_dto.pyi +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_dto.py apollo_openapi/model/open_item_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_identifier.py @@ -68,10 +74,6 @@ apollo_openapi/model/open_namespace_text_model.py apollo_openapi/model/open_namespace_text_model.pyi apollo_openapi/model/open_organization_dto.py apollo_openapi/model/open_organization_dto.pyi -apollo_openapi/model/open_page_dto_open_instance_dto.py -apollo_openapi/model/open_page_dto_open_instance_dto.pyi -apollo_openapi/model/open_page_dto_open_item_dto.py -apollo_openapi/model/open_page_dto_open_item_dto.pyi apollo_openapi/model/open_release_bo.py apollo_openapi/model/open_release_bo.pyi apollo_openapi/model/open_release_dto.py @@ -108,17 +110,18 @@ docs/models/OpenGrayReleaseRuleDTO.md docs/models/OpenGrayReleaseRuleItemDTO.md docs/models/OpenInstanceConfigDTO.md docs/models/OpenInstanceDTO.md +docs/models/OpenInstancePageDTO.md docs/models/OpenItemChangeSets.md docs/models/OpenItemDTO.md docs/models/OpenItemDiffs.md +docs/models/OpenItemPageDTO.md +docs/models/OpenMissEnvDTO.md docs/models/OpenNamespaceDTO.md docs/models/OpenNamespaceIdentifier.md docs/models/OpenNamespaceLockDTO.md docs/models/OpenNamespaceSyncModel.md docs/models/OpenNamespaceTextModel.md docs/models/OpenOrganizationDto.md -docs/models/OpenPageDTOOpenInstanceDTO.md -docs/models/OpenPageDTOOpenItemDTO.md docs/models/OpenReleaseBO.md docs/models/OpenReleaseDTO.md docs/models/RichResponseEntity.md @@ -146,17 +149,18 @@ test/test_models/test_open_gray_release_rule_dto.py test/test_models/test_open_gray_release_rule_item_dto.py 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_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_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_text_model.py test/test_models/test_open_organization_dto.py -test/test_models/test_open_page_dto_open_instance_dto.py -test/test_models/test_open_page_dto_open_item_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 diff --git a/python/README.md b/python/README.md index 56b8f29..fce4983 100644 --- a/python/README.md +++ b/python/README.md @@ -157,10 +157,11 @@ import apollo_openapi from pprint import pprint from apollo_openapi.apis.tags import app_management_api from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.multi_response_entity import MultiResponseEntity from apollo_openapi.model.open_app_dto import OpenAppDTO from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO 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_miss_env_dto import OpenMissEnvDTO # 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( @@ -198,6 +199,7 @@ with apollo_openapi.ApiClient(configuration) as api_client: org_name="org_name_example", owner_name="owner_name_example", owner_email="owner_email_example", + owner_display_name="owner_display_name_example", ), ) # OpenCreateAppDTO | @@ -220,18 +222,19 @@ Class | Method | HTTP request | Description *AppManagementApi* | [**delete_app**](docs/apis/tags/AppManagementApi.md#delete_app) | **delete** /openapi/v1/apps/{appId} | 删除应用(new added) *AppManagementApi* | [**find_apps**](docs/apis/tags/AppManagementApi.md#find_apps) | **get** /openapi/v1/apps | 查找应用 (original openapi) *AppManagementApi* | [**find_apps_authorized**](docs/apis/tags/AppManagementApi.md#find_apps_authorized) | **get** /openapi/v1/apps/authorized | 获取当前Consumer授权的应用列表 (original openapi) -*AppManagementApi* | [**find_miss_envs**](docs/apis/tags/AppManagementApi.md#find_miss_envs) | **get** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境(new added) +*AppManagementApi* | [**find_miss_envs**](docs/apis/tags/AppManagementApi.md#find_miss_envs) | **get** /openapi/v1/apps/{appId}/miss-envs | 查找缺失的环境(new added) *AppManagementApi* | [**get_app**](docs/apis/tags/AppManagementApi.md#get_app) | **get** /openapi/v1/apps/{appId} | 获取单个应用信息(new added) -*AppManagementApi* | [**get_app_nav_tree**](docs/apis/tags/AppManagementApi.md#get_app_nav_tree) | **get** /openapi/v1/apps/{appId}/navtree | 获取应用导航树(new added) -*AppManagementApi* | [**get_apps_by_self**](docs/apis/tags/AppManagementApi.md#get_apps_by_self) | **get** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页)(new added) -*AppManagementApi* | [**get_env_cluster_info**](docs/apis/tags/AppManagementApi.md#get_env_cluster_info) | **get** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) +*AppManagementApi* | [**get_apps_by_self**](docs/apis/tags/AppManagementApi.md#get_apps_by_self) | **get** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) +*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) *ClusterManagementApi* | [**create_cluster**](docs/apis/tags/ClusterManagementApi.md#create_cluster) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) *ClusterManagementApi* | [**delete_cluster**](docs/apis/tags/ClusterManagementApi.md#delete_cluster) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) *ClusterManagementApi* | [**get_cluster**](docs/apis/tags/ClusterManagementApi.md#get_cluster) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) *EnvironmentManagementApi* | [**get_envs**](docs/apis/tags/EnvironmentManagementApi.md#get_envs) | **get** /openapi/v1/envs | 获取所有环境 -*InstanceManagementApi* | [**get_by_release**](docs/apis/tags/InstanceManagementApi.md#get_by_release) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) -*InstanceManagementApi* | [**get_by_releases_not_in**](docs/apis/tags/InstanceManagementApi.md#get_by_releases_not_in) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) +*InstanceManagementApi* | [**get_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_by_namespace) | **get** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) +*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) @@ -295,17 +298,18 @@ Class | Method | HTTP request | Description - [OpenGrayReleaseRuleItemDTO](docs/models/OpenGrayReleaseRuleItemDTO.md) - [OpenInstanceConfigDTO](docs/models/OpenInstanceConfigDTO.md) - [OpenInstanceDTO](docs/models/OpenInstanceDTO.md) + - [OpenInstancePageDTO](docs/models/OpenInstancePageDTO.md) - [OpenItemChangeSets](docs/models/OpenItemChangeSets.md) - [OpenItemDTO](docs/models/OpenItemDTO.md) - [OpenItemDiffs](docs/models/OpenItemDiffs.md) + - [OpenItemPageDTO](docs/models/OpenItemPageDTO.md) + - [OpenMissEnvDTO](docs/models/OpenMissEnvDTO.md) - [OpenNamespaceDTO](docs/models/OpenNamespaceDTO.md) - [OpenNamespaceIdentifier](docs/models/OpenNamespaceIdentifier.md) - [OpenNamespaceLockDTO](docs/models/OpenNamespaceLockDTO.md) - [OpenNamespaceSyncModel](docs/models/OpenNamespaceSyncModel.md) - [OpenNamespaceTextModel](docs/models/OpenNamespaceTextModel.md) - [OpenOrganizationDto](docs/models/OpenOrganizationDto.md) - - [OpenPageDTOOpenInstanceDTO](docs/models/OpenPageDTOOpenInstanceDTO.md) - - [OpenPageDTOOpenItemDTO](docs/models/OpenPageDTOOpenItemDTO.md) - [OpenReleaseBO](docs/models/OpenReleaseBO.md) - [OpenReleaseDTO](docs/models/OpenReleaseDTO.md) - [RichResponseEntity](docs/models/RichResponseEntity.md) diff --git a/python/apollo_openapi/apis/path_to_api.py b/python/apollo_openapi/apis/path_to_api.py index b12a7ea..d957143 100644 --- a/python/apollo_openapi/apis/path_to_api.py +++ b/python/apollo_openapi/apis/path_to_api.py @@ -6,7 +6,7 @@ from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envclusters import OpenapiV1AppsAppIdEnvclusters from apollo_openapi.apis.paths.openapi_v1_apps_app_id import OpenapiV1AppsAppId from apollo_openapi.apis.paths.openapi_v1_apps_by_self import OpenapiV1AppsBySelf -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_navtree import OpenapiV1AppsAppIdNavtree +from apollo_openapi.apis.paths.openapi_v1_apps_app_id_env_cluster_info import OpenapiV1AppsAppIdEnvClusterInfo from apollo_openapi.apis.paths.openapi_v1_apps_envs_env import OpenapiV1AppsEnvsEnv from apollo_openapi.apis.paths.openapi_v1_apps_app_id_miss_envs import OpenapiV1AppsAppIdMissEnvs from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey @@ -30,8 +30,9 @@ from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_all import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAll from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances -from apollo_openapi.apis.paths.openapi_v1_envs_env_releases_release_id_instances import OpenapiV1EnvsEnvReleasesReleaseIdInstances -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_in import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn +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_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 @@ -57,9 +58,9 @@ PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERS: OpenapiV1AppsAppIdEnvclusters, PathValues.OPENAPI_V1_APPS_APP_ID: OpenapiV1AppsAppId, PathValues.OPENAPI_V1_APPS_BYSELF: OpenapiV1AppsBySelf, - PathValues.OPENAPI_V1_APPS_APP_ID_NAVTREE: OpenapiV1AppsAppIdNavtree, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERINFO: OpenapiV1AppsAppIdEnvClusterInfo, PathValues.OPENAPI_V1_APPS_ENVS_ENV: OpenapiV1AppsEnvsEnv, - PathValues.OPENAPI_V1_APPS_APP_ID_MISS_ENVS: OpenapiV1AppsAppIdMissEnvs, + PathValues.OPENAPI_V1_APPS_APP_ID_MISSENVS: OpenapiV1AppsAppIdMissEnvs, 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, @@ -81,8 +82,9 @@ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAll, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances, - PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES: OpenapiV1EnvsEnvReleasesReleaseIdInstances, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn, + 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_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, @@ -109,9 +111,9 @@ PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERS: OpenapiV1AppsAppIdEnvclusters, PathValues.OPENAPI_V1_APPS_APP_ID: OpenapiV1AppsAppId, PathValues.OPENAPI_V1_APPS_BYSELF: OpenapiV1AppsBySelf, - PathValues.OPENAPI_V1_APPS_APP_ID_NAVTREE: OpenapiV1AppsAppIdNavtree, + PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERINFO: OpenapiV1AppsAppIdEnvClusterInfo, PathValues.OPENAPI_V1_APPS_ENVS_ENV: OpenapiV1AppsEnvsEnv, - PathValues.OPENAPI_V1_APPS_APP_ID_MISS_ENVS: OpenapiV1AppsAppIdMissEnvs, + PathValues.OPENAPI_V1_APPS_APP_ID_MISSENVS: OpenapiV1AppsAppIdMissEnvs, 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, @@ -133,8 +135,9 @@ PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesAll, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances, - PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES: OpenapiV1EnvsEnvReleasesReleaseIdInstances, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstancesNotIn, + 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_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py new file mode 100644 index 0000000..e23ee37 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_apps_app_id_env_cluster_info.get import ApiForget + + +class OpenapiV1AppsAppIdEnvClusterInfo( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_navtree.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_navtree.py deleted file mode 100644 index 80b8180..0000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_navtree.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_navtree.get import ApiForget - - -class OpenapiV1AppsAppIdNavtree( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py new file mode 100644 index 0000000..468f5f9 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace.get import ApiForget + + +class OpenapiV1EnvsEnvInstancesByNamespace( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py new file mode 100644 index 0000000..df33bd8 --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.get import ApiForget + + +class OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py new file mode 100644 index 0000000..f0784db --- /dev/null +++ b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py @@ -0,0 +1,7 @@ +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_release.get import ApiForget + + +class OpenapiV1EnvsEnvInstancesByRelease( + ApiForget, +): + pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_instances.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_instances.py deleted file mode 100644 index 7394576..0000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_instances.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import ApiForget - - -class OpenapiV1EnvsEnvReleasesReleaseIdInstances( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/tags/app_management_api.py b/python/apollo_openapi/apis/tags/app_management_api.py index 5ee25dc..80354cc 100644 --- a/python/apollo_openapi/apis/tags/app_management_api.py +++ b/python/apollo_openapi/apis/tags/app_management_api.py @@ -16,9 +16,9 @@ from apollo_openapi.paths.openapi_v1_apps_authorized.get import FindAppsAuthorized from apollo_openapi.paths.openapi_v1_apps_app_id_miss_envs.get import FindMissEnvs from apollo_openapi.paths.openapi_v1_apps_app_id.get import GetApp -from apollo_openapi.paths.openapi_v1_apps_app_id_navtree.get import GetAppNavTree from apollo_openapi.paths.openapi_v1_apps_by_self.get import GetAppsBySelf -from apollo_openapi.paths.openapi_v1_apps_app_id_envclusters.get import GetEnvClusterInfo +from apollo_openapi.paths.openapi_v1_apps_app_id_env_cluster_info.get import GetEnvClusterInfo +from apollo_openapi.paths.openapi_v1_apps_app_id_envclusters.get import GetEnvClusters from apollo_openapi.paths.openapi_v1_apps_app_id.put import UpdateApp @@ -30,9 +30,9 @@ class AppManagementApi( FindAppsAuthorized, FindMissEnvs, GetApp, - GetAppNavTree, GetAppsBySelf, GetEnvClusterInfo, + GetEnvClusters, UpdateApp, ): """NOTE: This class is auto generated by OpenAPI Generator diff --git a/python/apollo_openapi/apis/tags/instance_management_api.py b/python/apollo_openapi/apis/tags/instance_management_api.py index 30cf505..e957b64 100644 --- a/python/apollo_openapi/apis/tags/instance_management_api.py +++ b/python/apollo_openapi/apis/tags/instance_management_api.py @@ -9,14 +9,16 @@ Generated by: https://openapi-generator.tech """ -from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances.get import GetByRelease -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances_not_in.get import GetByReleasesNotIn +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace.get import GetByNamespace +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_release.get import GetByRelease +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.get import GetByReleasesAndNamespaceNotIn from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.get import GetInstanceCountByNamespace class InstanceManagementApi( + GetByNamespace, GetByRelease, - GetByReleasesNotIn, + GetByReleasesAndNamespaceNotIn, GetInstanceCountByNamespace, ): """NOTE: This class is auto generated by OpenAPI Generator diff --git a/python/apollo_openapi/model/exception_response.py b/python/apollo_openapi/model/exception_response.py index d11665c..04fc3c5 100644 --- a/python/apollo_openapi/model/exception_response.py +++ b/python/apollo_openapi/model/exception_response.py @@ -30,31 +30,79 @@ class ExceptionResponse( Ref: https://openapi-generator.tech Do not edit the class manually. - - 错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) - """ class MetaOapg: - additional_properties = schemas.AnyTypeSchema - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + class properties: + status = schemas.IntSchema + message = schemas.StrSchema + timestamp = schemas.DateTimeSchema + exception = schemas.StrSchema + __annotations__ = { + "status": status, + "message": message, + "timestamp": timestamp, + "exception": exception, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["exception"]) -> MetaOapg.properties.exception: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "message", "timestamp", "exception", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, 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["timestamp"]) -> typing.Union[MetaOapg.properties.timestamp, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["exception"]) -> typing.Union[MetaOapg.properties.exception, 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["status", "message", "timestamp", "exception", ], str]): return super().get_item_oapg(name) + def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], + status: typing.Union[MetaOapg.properties.status, decimal.Decimal, int, schemas.Unset] = schemas.unset, + message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, + timestamp: typing.Union[MetaOapg.properties.timestamp, str, datetime, schemas.Unset] = schemas.unset, + exception: typing.Union[MetaOapg.properties.exception, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ExceptionResponse': return super().__new__( cls, *_args, + status=status, + message=message, + timestamp=timestamp, + exception=exception, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/exception_response.pyi b/python/apollo_openapi/model/exception_response.pyi index d11665c..04fc3c5 100644 --- a/python/apollo_openapi/model/exception_response.pyi +++ b/python/apollo_openapi/model/exception_response.pyi @@ -30,31 +30,79 @@ class ExceptionResponse( Ref: https://openapi-generator.tech Do not edit the class manually. - - 错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) - """ class MetaOapg: - additional_properties = schemas.AnyTypeSchema - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + class properties: + status = schemas.IntSchema + message = schemas.StrSchema + timestamp = schemas.DateTimeSchema + exception = schemas.StrSchema + __annotations__ = { + "status": status, + "message": message, + "timestamp": timestamp, + "exception": exception, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["exception"]) -> MetaOapg.properties.exception: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "message", "timestamp", "exception", ], str]): # dict_instance[name] accessor return super().__getitem__(name) - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, 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["timestamp"]) -> typing.Union[MetaOapg.properties.timestamp, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["exception"]) -> typing.Union[MetaOapg.properties.exception, 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["status", "message", "timestamp", "exception", ], str]): return super().get_item_oapg(name) + def __new__( cls, *_args: typing.Union[dict, frozendict.frozendict, ], + status: typing.Union[MetaOapg.properties.status, decimal.Decimal, int, schemas.Unset] = schemas.unset, + message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, + timestamp: typing.Union[MetaOapg.properties.timestamp, str, datetime, schemas.Unset] = schemas.unset, + exception: typing.Union[MetaOapg.properties.exception, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ExceptionResponse': return super().__new__( cls, *_args, + status=status, + message=message, + timestamp=timestamp, + exception=exception, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_app_dto.py b/python/apollo_openapi/model/open_app_dto.py index e64ede5..063d891 100644 --- a/python/apollo_openapi/model/open_app_dto.py +++ b/python/apollo_openapi/model/open_app_dto.py @@ -48,6 +48,7 @@ class properties: orgName = schemas.StrSchema ownerName = schemas.StrSchema ownerEmail = schemas.StrSchema + ownerDisplayName = schemas.StrSchema __annotations__ = { "dataChangeCreatedBy": dataChangeCreatedBy, "dataChangeLastModifiedBy": dataChangeLastModifiedBy, @@ -59,6 +60,7 @@ class properties: "orgName": orgName, "ownerName": ownerName, "ownerEmail": ownerEmail, + "ownerDisplayName": ownerDisplayName, } @typing.overload @@ -91,10 +93,13 @@ def __getitem__(self, name: typing_extensions.Literal["ownerName"]) -> MetaOapg. @typing.overload def __getitem__(self, name: typing_extensions.Literal["ownerEmail"]) -> MetaOapg.properties.ownerEmail: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownerDisplayName"]) -> MetaOapg.properties.ownerDisplayName: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -129,10 +134,13 @@ def get_item_oapg(self, name: typing_extensions.Literal["ownerName"]) -> typing. @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["ownerEmail"]) -> typing.Union[MetaOapg.properties.ownerEmail, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownerDisplayName"]) -> typing.Union[MetaOapg.properties.ownerDisplayName, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], str]): return super().get_item_oapg(name) @@ -149,6 +157,7 @@ def __new__( orgName: typing.Union[MetaOapg.properties.orgName, str, schemas.Unset] = schemas.unset, ownerName: typing.Union[MetaOapg.properties.ownerName, str, schemas.Unset] = schemas.unset, ownerEmail: typing.Union[MetaOapg.properties.ownerEmail, str, schemas.Unset] = schemas.unset, + ownerDisplayName: typing.Union[MetaOapg.properties.ownerDisplayName, 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], ) -> 'OpenAppDTO': @@ -165,6 +174,7 @@ def __new__( orgName=orgName, ownerName=ownerName, ownerEmail=ownerEmail, + ownerDisplayName=ownerDisplayName, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_app_dto.pyi b/python/apollo_openapi/model/open_app_dto.pyi index e64ede5..063d891 100644 --- a/python/apollo_openapi/model/open_app_dto.pyi +++ b/python/apollo_openapi/model/open_app_dto.pyi @@ -48,6 +48,7 @@ class OpenAppDTO( orgName = schemas.StrSchema ownerName = schemas.StrSchema ownerEmail = schemas.StrSchema + ownerDisplayName = schemas.StrSchema __annotations__ = { "dataChangeCreatedBy": dataChangeCreatedBy, "dataChangeLastModifiedBy": dataChangeLastModifiedBy, @@ -59,6 +60,7 @@ class OpenAppDTO( "orgName": orgName, "ownerName": ownerName, "ownerEmail": ownerEmail, + "ownerDisplayName": ownerDisplayName, } @typing.overload @@ -91,10 +93,13 @@ class OpenAppDTO( @typing.overload def __getitem__(self, name: typing_extensions.Literal["ownerEmail"]) -> MetaOapg.properties.ownerEmail: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["ownerDisplayName"]) -> MetaOapg.properties.ownerDisplayName: ... + @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -129,10 +134,13 @@ class OpenAppDTO( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["ownerEmail"]) -> typing.Union[MetaOapg.properties.ownerEmail, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["ownerDisplayName"]) -> typing.Union[MetaOapg.properties.ownerDisplayName, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], str]): return super().get_item_oapg(name) @@ -149,6 +157,7 @@ class OpenAppDTO( orgName: typing.Union[MetaOapg.properties.orgName, str, schemas.Unset] = schemas.unset, ownerName: typing.Union[MetaOapg.properties.ownerName, str, schemas.Unset] = schemas.unset, ownerEmail: typing.Union[MetaOapg.properties.ownerEmail, str, schemas.Unset] = schemas.unset, + ownerDisplayName: typing.Union[MetaOapg.properties.ownerDisplayName, 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], ) -> 'OpenAppDTO': @@ -165,6 +174,7 @@ class OpenAppDTO( orgName=orgName, ownerName=ownerName, ownerEmail=ownerEmail, + ownerDisplayName=ownerDisplayName, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_create_app_dto.py b/python/apollo_openapi/model/open_create_app_dto.py index 97b1ef1..7239270 100644 --- a/python/apollo_openapi/model/open_create_app_dto.py +++ b/python/apollo_openapi/model/open_create_app_dto.py @@ -47,6 +47,7 @@ class admins( class MetaOapg: + unique_items = True items = schemas.StrSchema def __new__( diff --git a/python/apollo_openapi/model/open_env_cluster_info.py b/python/apollo_openapi/model/open_env_cluster_info.py index f73e1d6..903e61b 100644 --- a/python/apollo_openapi/model/open_env_cluster_info.py +++ b/python/apollo_openapi/model/open_env_cluster_info.py @@ -36,6 +36,8 @@ class OpenEnvClusterInfo( class MetaOapg: class properties: + code = schemas.IntSchema + message = schemas.StrSchema env = schemas.StrSchema @@ -64,10 +66,18 @@ def __new__( def __getitem__(self, i: int) -> 'OpenClusterDTO': return super().__getitem__(i) __annotations__ = { + "code": code, + "message": message, "env": env, "clusters": clusters, } + @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["env"]) -> MetaOapg.properties.env: ... @@ -77,11 +87,17 @@ def __getitem__(self, name: typing_extensions.Literal["clusters"]) -> MetaOapg.p @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["env", "clusters", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "env", "clusters", ], 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["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... @@ -91,13 +107,15 @@ def get_item_oapg(self, name: typing_extensions.Literal["clusters"]) -> typing.U @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["env", "clusters", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "env", "clusters", ], 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, env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, clusters: typing.Union[MetaOapg.properties.clusters, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -106,6 +124,8 @@ def __new__( return super().__new__( cls, *_args, + code=code, + message=message, env=env, clusters=clusters, _configuration=_configuration, diff --git a/python/apollo_openapi/model/open_env_cluster_info.pyi b/python/apollo_openapi/model/open_env_cluster_info.pyi index f73e1d6..903e61b 100644 --- a/python/apollo_openapi/model/open_env_cluster_info.pyi +++ b/python/apollo_openapi/model/open_env_cluster_info.pyi @@ -36,6 +36,8 @@ class OpenEnvClusterInfo( class MetaOapg: class properties: + code = schemas.IntSchema + message = schemas.StrSchema env = schemas.StrSchema @@ -64,10 +66,18 @@ class OpenEnvClusterInfo( def __getitem__(self, i: int) -> 'OpenClusterDTO': return super().__getitem__(i) __annotations__ = { + "code": code, + "message": message, "env": env, "clusters": clusters, } + @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["env"]) -> MetaOapg.properties.env: ... @@ -77,11 +87,17 @@ class OpenEnvClusterInfo( @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["env", "clusters", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "env", "clusters", ], 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["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... @@ -91,13 +107,15 @@ class OpenEnvClusterInfo( @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["env", "clusters", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "env", "clusters", ], 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, env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, clusters: typing.Union[MetaOapg.properties.clusters, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -106,6 +124,8 @@ class OpenEnvClusterInfo( return super().__new__( cls, *_args, + code=code, + message=message, env=env, clusters=clusters, _configuration=_configuration, diff --git a/python/apollo_openapi/model/open_page_dto_open_instance_dto.py b/python/apollo_openapi/model/open_instance_page_dto.py similarity index 87% rename from python/apollo_openapi/model/open_page_dto_open_instance_dto.py rename to python/apollo_openapi/model/open_instance_page_dto.py index b285009..ff372a2 100644 --- a/python/apollo_openapi/model/open_page_dto_open_instance_dto.py +++ b/python/apollo_openapi/model/open_instance_page_dto.py @@ -23,7 +23,7 @@ from apollo_openapi import schemas # noqa: F401 -class OpenPageDTOOpenInstanceDTO( +class OpenInstancePageDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,7 +43,7 @@ class properties: total = schemas.Int64Schema - class content( + class instances( schemas.ListSchema ): @@ -58,7 +58,7 @@ def __new__( cls, _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'content': + ) -> 'instances': return super().__new__( cls, _arg, @@ -71,7 +71,7 @@ def __getitem__(self, i: int) -> 'OpenInstanceDTO': "page": page, "size": size, "total": total, - "content": content, + "instances": instances, } @typing.overload @@ -84,12 +84,12 @@ def __getitem__(self, name: typing_extensions.Literal["size"]) -> MetaOapg.prope def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... + def __getitem__(self, name: typing_extensions.Literal["instances"]) -> MetaOapg.properties.instances: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "content", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -104,12 +104,12 @@ def get_item_oapg(self, name: typing_extensions.Literal["size"]) -> typing.Union def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content"]) -> typing.Union[MetaOapg.properties.content, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["instances"]) -> typing.Union[MetaOapg.properties.instances, 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["page", "size", "total", "content", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], str]): return super().get_item_oapg(name) @@ -119,17 +119,17 @@ def __new__( page: typing.Union[MetaOapg.properties.page, decimal.Decimal, int, schemas.Unset] = schemas.unset, size: typing.Union[MetaOapg.properties.size, decimal.Decimal, int, schemas.Unset] = schemas.unset, total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, schemas.Unset] = schemas.unset, - content: typing.Union[MetaOapg.properties.content, list, tuple, schemas.Unset] = schemas.unset, + instances: typing.Union[MetaOapg.properties.instances, 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], - ) -> 'OpenPageDTOOpenInstanceDTO': + ) -> 'OpenInstancePageDTO': return super().__new__( cls, *_args, page=page, size=size, total=total, - content=content, + instances=instances, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi b/python/apollo_openapi/model/open_instance_page_dto.pyi similarity index 87% rename from python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi rename to python/apollo_openapi/model/open_instance_page_dto.pyi index b285009..ff372a2 100644 --- a/python/apollo_openapi/model/open_page_dto_open_instance_dto.pyi +++ b/python/apollo_openapi/model/open_instance_page_dto.pyi @@ -23,7 +23,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -class OpenPageDTOOpenInstanceDTO( +class OpenInstancePageDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,7 +43,7 @@ class OpenPageDTOOpenInstanceDTO( total = schemas.Int64Schema - class content( + class instances( schemas.ListSchema ): @@ -58,7 +58,7 @@ class OpenPageDTOOpenInstanceDTO( cls, _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'content': + ) -> 'instances': return super().__new__( cls, _arg, @@ -71,7 +71,7 @@ class OpenPageDTOOpenInstanceDTO( "page": page, "size": size, "total": total, - "content": content, + "instances": instances, } @typing.overload @@ -84,12 +84,12 @@ class OpenPageDTOOpenInstanceDTO( def __getitem__(self, name: typing_extensions.Literal["total"]) -> MetaOapg.properties.total: ... @typing.overload - def __getitem__(self, name: typing_extensions.Literal["content"]) -> MetaOapg.properties.content: ... + def __getitem__(self, name: typing_extensions.Literal["instances"]) -> MetaOapg.properties.instances: ... @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "content", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -104,12 +104,12 @@ class OpenPageDTOOpenInstanceDTO( def get_item_oapg(self, name: typing_extensions.Literal["total"]) -> typing.Union[MetaOapg.properties.total, schemas.Unset]: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["content"]) -> typing.Union[MetaOapg.properties.content, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["instances"]) -> typing.Union[MetaOapg.properties.instances, 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["page", "size", "total", "content", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], str]): return super().get_item_oapg(name) @@ -119,17 +119,17 @@ class OpenPageDTOOpenInstanceDTO( page: typing.Union[MetaOapg.properties.page, decimal.Decimal, int, schemas.Unset] = schemas.unset, size: typing.Union[MetaOapg.properties.size, decimal.Decimal, int, schemas.Unset] = schemas.unset, total: typing.Union[MetaOapg.properties.total, decimal.Decimal, int, schemas.Unset] = schemas.unset, - content: typing.Union[MetaOapg.properties.content, list, tuple, schemas.Unset] = schemas.unset, + instances: typing.Union[MetaOapg.properties.instances, 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], - ) -> 'OpenPageDTOOpenInstanceDTO': + ) -> 'OpenInstancePageDTO': return super().__new__( cls, *_args, page=page, size=size, total=total, - content=content, + instances=instances, _configuration=_configuration, **kwargs, ) diff --git a/python/apollo_openapi/model/open_page_dto_open_item_dto.py b/python/apollo_openapi/model/open_item_page_dto.py similarity index 98% rename from python/apollo_openapi/model/open_page_dto_open_item_dto.py rename to python/apollo_openapi/model/open_item_page_dto.py index 0c13318..5470da4 100644 --- a/python/apollo_openapi/model/open_page_dto_open_item_dto.py +++ b/python/apollo_openapi/model/open_item_page_dto.py @@ -23,7 +23,7 @@ from apollo_openapi import schemas # noqa: F401 -class OpenPageDTOOpenItemDTO( +class OpenItemPageDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -122,7 +122,7 @@ def __new__( content: typing.Union[MetaOapg.properties.content, 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], - ) -> 'OpenPageDTOOpenItemDTO': + ) -> 'OpenItemPageDTO': return super().__new__( cls, *_args, diff --git a/python/apollo_openapi/model/open_page_dto_open_item_dto.pyi b/python/apollo_openapi/model/open_item_page_dto.pyi similarity index 98% rename from python/apollo_openapi/model/open_page_dto_open_item_dto.pyi rename to python/apollo_openapi/model/open_item_page_dto.pyi index 0c13318..5470da4 100644 --- a/python/apollo_openapi/model/open_page_dto_open_item_dto.pyi +++ b/python/apollo_openapi/model/open_item_page_dto.pyi @@ -23,7 +23,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -class OpenPageDTOOpenItemDTO( +class OpenItemPageDTO( schemas.DictSchema ): """NOTE: This class is auto generated by OpenAPI Generator. @@ -122,7 +122,7 @@ class OpenPageDTOOpenItemDTO( content: typing.Union[MetaOapg.properties.content, 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], - ) -> 'OpenPageDTOOpenItemDTO': + ) -> 'OpenItemPageDTO': return super().__new__( cls, *_args, diff --git a/python/apollo_openapi/model/open_miss_env_dto.py b/python/apollo_openapi/model/open_miss_env_dto.py new file mode 100644 index 0000000..82068cc --- /dev/null +++ b/python/apollo_openapi/model/open_miss_env_dto.py @@ -0,0 +1,88 @@ +# 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 OpenMissEnvDTO( + 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 + __annotations__ = { + "code": code, + "message": message, + } + + @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: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], 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, + _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], + ) -> 'OpenMissEnvDTO': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/model/open_miss_env_dto.pyi b/python/apollo_openapi/model/open_miss_env_dto.pyi new file mode 100644 index 0000000..82068cc --- /dev/null +++ b/python/apollo_openapi/model/open_miss_env_dto.pyi @@ -0,0 +1,88 @@ +# 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 OpenMissEnvDTO( + 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 + __annotations__ = { + "code": code, + "message": message, + } + + @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: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], 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, + _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], + ) -> 'OpenMissEnvDTO': + return super().__new__( + cls, + *_args, + code=code, + message=message, + _configuration=_configuration, + **kwargs, + ) diff --git a/python/apollo_openapi/models/__init__.py b/python/apollo_openapi/models/__init__.py index 8a64d45..0528e7d 100644 --- a/python/apollo_openapi/models/__init__.py +++ b/python/apollo_openapi/models/__init__.py @@ -27,17 +27,18 @@ from apollo_openapi.model.open_gray_release_rule_item_dto import OpenGrayReleaseRuleItemDTO from apollo_openapi.model.open_instance_config_dto import OpenInstanceConfigDTO from apollo_openapi.model.open_instance_dto import OpenInstanceDTO +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_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_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_text_model import OpenNamespaceTextModel from apollo_openapi.model.open_organization_dto import OpenOrganizationDto -from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO -from apollo_openapi.model.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO 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 diff --git a/python/apollo_openapi/paths/__init__.py b/python/apollo_openapi/paths/__init__.py index 4437ce9..4940bd4 100644 --- a/python/apollo_openapi/paths/__init__.py +++ b/python/apollo_openapi/paths/__init__.py @@ -11,9 +11,9 @@ class PathValues(str, enum.Enum): OPENAPI_V1_APPS_APP_ID_ENVCLUSTERS = "/openapi/v1/apps/{appId}/envclusters" OPENAPI_V1_APPS_APP_ID = "/openapi/v1/apps/{appId}" OPENAPI_V1_APPS_BYSELF = "/openapi/v1/apps/by-self" - OPENAPI_V1_APPS_APP_ID_NAVTREE = "/openapi/v1/apps/{appId}/navtree" + OPENAPI_V1_APPS_APP_ID_ENVCLUSTERINFO = "/openapi/v1/apps/{appId}/env-cluster-info" OPENAPI_V1_APPS_ENVS_ENV = "/openapi/v1/apps/envs/{env}" - OPENAPI_V1_APPS_APP_ID_MISS_ENVS = "/openapi/v1/apps/{appId}/miss_envs" + OPENAPI_V1_APPS_APP_ID_MISSENVS = "/openapi/v1/apps/{appId}/miss-envs" 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}" @@ -35,8 +35,9 @@ class PathValues(str, enum.Enum): OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ALL = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/all" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_ACTIVE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES = "/openapi/v1/envs/{env}/releases/{releaseId}/instances" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES_NOT_IN = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in" + 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_APPS_APP_ID_APPNAMESPACES = "/openapi/v1/apps/{appId}/appnamespaces" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" diff --git a/python/apollo_openapi/paths/openapi_v1_apps/get.py b/python/apollo_openapi/paths/openapi_v1_apps/get.py index 46598c1..73b2a17 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps/get.py @@ -103,43 +103,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps/get.pyi index 8d493b7..309e527 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps/get.pyi @@ -98,43 +98,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps/post.py b/python/apollo_openapi/paths/openapi_v1_apps/post.py index 546e7f8..7a38099 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps/post.py +++ b/python/apollo_openapi/paths/openapi_v1_apps/post.py @@ -25,6 +25,7 @@ from apollo_openapi import schemas # noqa: F401 +from apollo_openapi.model.open_app_dto import OpenAppDTO from apollo_openapi.model.exception_response import ExceptionResponse from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO @@ -44,7 +45,7 @@ _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema +SchemaFor200ResponseBodyApplicationJson = OpenAppDTO @dataclass @@ -63,43 +64,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -118,43 +83,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps/post.pyi index 9e46fa3..ee5504a 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps/post.pyi @@ -25,6 +25,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 +from apollo_openapi.model.open_app_dto import OpenAppDTO from apollo_openapi.model.exception_response import ExceptionResponse from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO @@ -39,7 +40,7 @@ request_body_open_create_app_dto = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema +SchemaFor200ResponseBodyApplicationJson = OpenAppDTO @dataclass @@ -58,43 +59,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -113,43 +78,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py index 54a5ac3..752701a 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py @@ -34,12 +34,12 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -53,7 +53,6 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -85,44 +84,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -141,43 +103,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -196,43 +122,7 @@ class ApiResponseFor403(api_client.ApiResponse): schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi index 866ae22..907e88f 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi @@ -32,12 +32,12 @@ OperatorSchema = schemas.StrSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { - 'operator': typing.Union[OperatorSchema, str, ], } ) RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'operator': typing.Union[OperatorSchema, str, ], }, total=False ) @@ -51,7 +51,6 @@ request_query_operator = api_client.QueryParameter( name="operator", style=api_client.ParameterStyle.FORM, schema=OperatorSchema, - required=True, explode=True, ) # Path params @@ -80,44 +79,7 @@ request_path_app_id = api_client.PathParameter( schema=AppIdSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -136,43 +98,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -191,43 +117,7 @@ _response_for_403 = api_client.OpenApiResponse( schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py index 1dc407f..11c1bd5 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py @@ -78,43 +78,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi index 0a12a81..91c7b1e 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi @@ -73,43 +73,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py index 076e94f..6790e3c 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/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 @@ -97,7 +96,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = OpenAppDTO +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -116,43 +115,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -171,43 +134,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi index 27944cb..e11a5bb 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id/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 @@ -92,7 +91,7 @@ request_body_open_app_dto = api_client.RequestBody( }, required=True, ) -SchemaFor200ResponseBodyApplicationJson = OpenAppDTO +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -111,43 +110,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -166,43 +129,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 b13cae7..52faccd 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 @@ -89,43 +89,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -144,43 +108,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 de22e8d..cc303cb 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 @@ -84,43 +84,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -139,43 +103,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 fc616c6..404f22c 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 @@ -91,44 +91,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 e6444f4..09d9ae8 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 @@ -86,44 +86,7 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__init__.py similarity index 62% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__init__.py index ef8dd9f..9aaa307 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__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_navtree import Api +# from apollo_openapi.paths.openapi_v1_apps_app_id_env_cluster_info import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_APPS_APP_ID_NAVTREE +path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERINFO diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py similarity index 88% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.py rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py index d3eaef0..5eaa1f1 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py @@ -25,7 +25,7 @@ from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.multi_response_entity import MultiResponseEntity +from apollo_openapi.model.open_env_cluster_info import OpenEnvClusterInfo from . import path @@ -58,7 +58,32 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenEnvClusterInfo']: + return OpenEnvClusterInfo + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenEnvClusterInfo'], typing.List['OpenEnvClusterInfo']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenEnvClusterInfo': + return super().__getitem__(i) @dataclass @@ -87,7 +112,7 @@ class ApiResponseFor200(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -99,7 +124,7 @@ def _get_app_nav_tree_oapg( ]: ... @typing.overload - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -109,7 +134,7 @@ def _get_app_nav_tree_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -121,7 +146,7 @@ def _get_app_nav_tree_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -130,7 +155,7 @@ def _get_app_nav_tree_oapg( skip_deserialization: bool = False, ): """ - 获取应用导航树(new added) + 获取应用环境集群详情(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 @@ -185,11 +210,11 @@ class instances return api_response -class GetAppNavTree(BaseApi): +class GetEnvClusterInfo(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_app_nav_tree( + def get_env_cluster_info( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -201,7 +226,7 @@ def get_app_nav_tree( ]: ... @typing.overload - def get_app_nav_tree( + def get_env_cluster_info( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -211,7 +236,7 @@ def get_app_nav_tree( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_app_nav_tree( + def get_env_cluster_info( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -223,7 +248,7 @@ def get_app_nav_tree( api_client.ApiResponseWithoutDeserialization, ]: ... - def get_app_nav_tree( + def get_env_cluster_info( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -231,7 +256,7 @@ def get_app_nav_tree( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_nav_tree_oapg( + return self._get_env_cluster_info_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -286,7 +311,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_nav_tree_oapg( + return self._get_env_cluster_info_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_navtree/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.pyi similarity index 88% rename from python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.pyi rename to python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.pyi index a0cb92c..336eacc 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_navtree/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.multi_response_entity import MultiResponseEntity +from apollo_openapi.model.open_env_cluster_info import OpenEnvClusterInfo # Path params AppIdSchema = schemas.StrSchema @@ -53,7 +53,32 @@ request_path_app_id = api_client.PathParameter( schema=AppIdSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenEnvClusterInfo']: + return OpenEnvClusterInfo + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenEnvClusterInfo'], typing.List['OpenEnvClusterInfo']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenEnvClusterInfo': + return super().__getitem__(i) @dataclass @@ -79,7 +104,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -91,7 +116,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -101,7 +126,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -113,7 +138,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_app_nav_tree_oapg( + def _get_env_cluster_info_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -122,7 +147,7 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ): """ - 获取应用导航树(new added) + 获取应用环境集群详情(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 @@ -177,11 +202,11 @@ class BaseApi(api_client.Api): return api_response -class GetAppNavTree(BaseApi): +class GetEnvClusterInfo(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_app_nav_tree( + def get_env_cluster_info( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -193,7 +218,7 @@ class GetAppNavTree(BaseApi): ]: ... @typing.overload - def get_app_nav_tree( + def get_env_cluster_info( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -203,7 +228,7 @@ class GetAppNavTree(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_app_nav_tree( + def get_env_cluster_info( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -215,7 +240,7 @@ class GetAppNavTree(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def get_app_nav_tree( + def get_env_cluster_info( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -223,7 +248,7 @@ class GetAppNavTree(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_nav_tree_oapg( + return self._get_env_cluster_info_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -278,7 +303,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_app_nav_tree_oapg( + return self._get_env_cluster_info_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_envclusters/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py index de29797..12db8cb 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py @@ -103,43 +103,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -169,7 +133,7 @@ class ApiResponseFor404(api_client.ApiResponse): class BaseApi(api_client.Api): @typing.overload - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -181,7 +145,7 @@ def _get_env_cluster_info_oapg( ]: ... @typing.overload - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -191,7 +155,7 @@ def _get_env_cluster_info_oapg( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -203,7 +167,7 @@ def _get_env_cluster_info_oapg( api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -267,11 +231,11 @@ class instances return api_response -class GetEnvClusterInfo(BaseApi): +class GetEnvClusters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_env_cluster_info( + def get_env_clusters( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -283,7 +247,7 @@ def get_env_cluster_info( ]: ... @typing.overload - def get_env_cluster_info( + def get_env_clusters( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -293,7 +257,7 @@ def get_env_cluster_info( ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_env_cluster_info( + def get_env_clusters( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -305,7 +269,7 @@ def get_env_cluster_info( api_client.ApiResponseWithoutDeserialization, ]: ... - def get_env_cluster_info( + def get_env_clusters( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -313,7 +277,7 @@ def get_env_cluster_info( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_env_cluster_info_oapg( + return self._get_env_clusters_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -368,7 +332,7 @@ def get( timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_env_cluster_info_oapg( + return self._get_env_clusters_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_envclusters/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi index 5feec3b..c4dd255 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi @@ -98,43 +98,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -160,7 +124,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): @typing.overload - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -172,7 +136,7 @@ class BaseApi(api_client.Api): ]: ... @typing.overload - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -182,7 +146,7 @@ class BaseApi(api_client.Api): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -194,7 +158,7 @@ class BaseApi(api_client.Api): api_client.ApiResponseWithoutDeserialization, ]: ... - def _get_env_cluster_info_oapg( + def _get_env_clusters_oapg( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -258,11 +222,11 @@ class BaseApi(api_client.Api): return api_response -class GetEnvClusterInfo(BaseApi): +class GetEnvClusters(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names @typing.overload - def get_env_cluster_info( + def get_env_clusters( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -274,7 +238,7 @@ class GetEnvClusterInfo(BaseApi): ]: ... @typing.overload - def get_env_cluster_info( + def get_env_clusters( self, skip_deserialization: typing_extensions.Literal[True], path_params: RequestPathParams = frozendict.frozendict(), @@ -284,7 +248,7 @@ class GetEnvClusterInfo(BaseApi): ) -> api_client.ApiResponseWithoutDeserialization: ... @typing.overload - def get_env_cluster_info( + def get_env_clusters( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -296,7 +260,7 @@ class GetEnvClusterInfo(BaseApi): api_client.ApiResponseWithoutDeserialization, ]: ... - def get_env_cluster_info( + def get_env_clusters( self, path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, @@ -304,7 +268,7 @@ class GetEnvClusterInfo(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_env_cluster_info_oapg( + return self._get_env_clusters_oapg( path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -359,7 +323,7 @@ class ApiForget(BaseApi): timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, ): - return self._get_env_cluster_info_oapg( + return self._get_env_clusters_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_links/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_links/delete.py index 7d3a927..6312a68 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_links/delete.py @@ -107,44 +107,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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_links/delete.pyi index 1039f76..d303251 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_links/delete.pyi @@ -102,44 +102,7 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py index d5ab9b7..904314c 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py @@ -4,4 +4,4 @@ from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_APPS_APP_ID_MISS_ENVS +path = PathValues.OPENAPI_V1_APPS_APP_ID_MISSENVS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py index dc87589..452b9da 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py @@ -25,8 +25,8 @@ from apollo_openapi import schemas # noqa: F401 +from apollo_openapi.model.open_miss_env_dto import OpenMissEnvDTO from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.multi_response_entity import MultiResponseEntity from . import path @@ -59,7 +59,32 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenMissEnvDTO']: + return OpenMissEnvDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenMissEnvDTO'], typing.List['OpenMissEnvDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenMissEnvDTO': + return super().__getitem__(i) @dataclass @@ -78,43 +103,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi index a31a5b0..e06a238 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi @@ -25,8 +25,8 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 +from apollo_openapi.model.open_miss_env_dto import OpenMissEnvDTO from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.multi_response_entity import MultiResponseEntity # Path params AppIdSchema = schemas.StrSchema @@ -54,7 +54,32 @@ request_path_app_id = api_client.PathParameter( schema=AppIdSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = MultiResponseEntity + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenMissEnvDTO']: + return OpenMissEnvDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenMissEnvDTO'], typing.List['OpenMissEnvDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenMissEnvDTO': + return super().__getitem__(i) @dataclass @@ -73,43 +98,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py index 0268279..94f58a8 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py @@ -77,43 +77,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi index 2e9e9ad..a6822d6 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi @@ -72,43 +72,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py b/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py index c9eb89c..656cfd9 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py @@ -129,43 +129,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -238,7 +202,7 @@ def _get_apps_by_self_oapg( skip_deserialization: bool = False, ): """ - 获取当前Consumer的应用列表(分页)(new added) + 获取当前Consumer/User的应用列表(分页)(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 diff --git a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi index 845515d..b2b38cc 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi @@ -118,43 +118,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -223,7 +187,7 @@ class BaseApi(api_client.Api): skip_deserialization: bool = False, ): """ - 获取当前Consumer的应用列表(分页)(new added) + 获取当前Consumer/User的应用列表(分页)(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 diff --git a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py index 68a70e0..1e54681 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py +++ b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/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 @@ -97,44 +96,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -153,43 +115,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -208,43 +134,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi index 857dfd1..0ef02df 100644 --- a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_apps_envs_env/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 @@ -92,44 +91,7 @@ request_body_open_app_dto = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -148,43 +110,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -203,43 +129,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py index 67fbe32..b297062 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py @@ -97,43 +97,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -152,43 +116,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi index 8f8661a..e5b3c09 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi @@ -92,43 +92,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -147,43 +111,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py index c4fec0c..cca0bee 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py @@ -100,44 +100,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -156,43 +119,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -211,43 +138,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -266,43 +157,7 @@ class ApiResponseFor403(api_client.ApiResponse): schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi index b90fede..a8bb963 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi @@ -95,44 +95,7 @@ request_path_cluster_name = api_client.PathParameter( schema=ClusterNameSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -151,43 +114,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -206,43 +133,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -261,43 +152,7 @@ _response_for_403 = api_client.OpenApiResponse( schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py index 75ba0b7..7bfa28b 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py @@ -94,43 +94,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi index c95a54d..7322529 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi @@ -89,43 +89,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 d9678a7..4355516 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 @@ -102,43 +102,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 b6c3dc0..6a367c4 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 @@ -97,43 +97,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 914d4ac..7968ef5 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 @@ -115,44 +115,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 5a99fcd..9199418 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 @@ -110,44 +110,7 @@ request_path_branch_name = api_client.PathParameter( schema=BranchNameSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 f0d3ed5..f8a38aa 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 @@ -135,43 +135,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 abb3ea2..0f0276e 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 @@ -130,43 +130,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py index 02cac70..16e8bb3 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py @@ -149,43 +149,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -204,43 +168,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi index 6e62f37..88fb992 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi @@ -144,43 +144,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -199,43 +163,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 6fada4f..9a6f208 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,44 +128,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 aa9c817..0427743 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,44 +123,7 @@ request_body_open_gray_release_rule_dto = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 2b9e54d..e632a99 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 @@ -115,44 +115,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 e43184b..77854ff 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 @@ -110,44 +110,7 @@ request_path_key = api_client.PathParameter( schema=KeySchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py index f749937..d277d89 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py @@ -110,43 +110,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi index 96d73e0..1c9cbc4 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi @@ -105,43 +105,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 fc60822..e44f3f7 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 @@ -129,44 +129,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -185,43 +148,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -240,43 +167,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -295,43 +186,7 @@ class ApiResponseFor403(api_client.ApiResponse): schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 4390a11..dbd213b 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 @@ -124,44 +124,7 @@ request_body_open_item_dto = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -180,43 +143,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -235,43 +162,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -290,43 +181,7 @@ _response_for_403 = api_client.OpenApiResponse( schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py index 1c22811..8d2f746 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py @@ -25,7 +25,7 @@ from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO from apollo_openapi.model.exception_response import ExceptionResponse from . import path @@ -135,7 +135,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenItemDTO +SchemaFor200ResponseBodyApplicationJson = OpenItemPageDTO @dataclass @@ -154,43 +154,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi index 8cf7445..c62b5e6 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi @@ -25,7 +25,7 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO from apollo_openapi.model.exception_response import ExceptionResponse # Query params @@ -124,7 +124,7 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) -SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenItemDTO +SchemaFor200ResponseBodyApplicationJson = OpenItemPageDTO @dataclass @@ -143,43 +143,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 4a5a0cf..02ec281 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 @@ -140,43 +140,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -195,43 +159,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 eb1e2b6..1303261 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 @@ -135,43 +135,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -190,43 +154,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_batch_update/put.py index 356ee07..ddaf7c3 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_batch_update/put.py @@ -121,44 +121,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -177,43 +140,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_batch_update/put.pyi index eec274c..3a4014e 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_batch_update/put.pyi @@ -116,44 +116,7 @@ request_body_open_namespace_text_model = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -172,43 +135,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 0157c9c..bc1afcb 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 @@ -115,44 +115,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 190bfcb..6de5c8c 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 @@ -110,44 +110,7 @@ request_path_key = api_client.PathParameter( schema=KeySchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py index ba6cce9..8bed8ee 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py @@ -110,43 +110,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi index 5d0e026..b0f2901 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi @@ -105,43 +105,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 9725768..0810909 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 @@ -129,44 +129,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -185,43 +148,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -240,43 +167,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -295,43 +186,7 @@ class ApiResponseFor403(api_client.ApiResponse): schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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 73309fd..f845146 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 @@ -124,44 +124,7 @@ request_body_open_item_dto = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -180,43 +143,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -235,43 +162,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -290,43 +181,7 @@ _response_for_403 = api_client.OpenApiResponse( schema=SchemaFor403ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_revert/post.py index 8bec76b..6277298 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_revert/post.py @@ -109,44 +109,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -165,43 +128,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -220,43 +147,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_revert/post.pyi index e0eff51..b399d6a 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_revert/post.pyi @@ -104,44 +104,7 @@ request_path_namespace_name = api_client.PathParameter( schema=NamespaceNameSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -160,43 +123,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -215,43 +142,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_sync/post.py index 6c1aae1..8cc50d6 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_sync/post.py @@ -121,44 +121,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -177,43 +140,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -232,43 +159,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_sync/post.pyi index 0c76d9d..e1780ca 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_sync/post.pyi @@ -116,44 +116,7 @@ request_body_open_namespace_sync_model = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -172,43 +135,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -227,43 +154,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_validate/post.py index a5ac515..0923c0b 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_validate/post.py @@ -94,44 +94,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -150,43 +113,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass 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_validate/post.pyi index 8b3a78e..5affcf3 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_validate/post.pyi @@ -89,44 +89,7 @@ request_body_open_namespace_text_model = api_client.RequestBody( }, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass @@ -145,43 +108,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py index 2f8c955..2f90210 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py @@ -114,43 +114,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -169,43 +133,7 @@ class ApiResponseFor400(api_client.ApiResponse): schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi index 035d37c..2d36851 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi @@ -109,43 +109,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor400ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor400ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor400ResponseBodyApplicationJson = ExceptionResponse @dataclass @@ -164,43 +128,7 @@ _response_for_400 = api_client.OpenApiResponse( schema=SchemaFor400ResponseBodyApplicationJson), }, ) - - -class SchemaFor403ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor403ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor403ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py index 36da3a6..2f845fc 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py @@ -102,43 +102,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi index 89eb091..9fdda61 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi @@ -97,43 +97,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor404ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor404ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor404ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/__init__.py similarity index 59% rename from python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__init__.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/__init__.py index 2d1fda7..f0522eb 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/__init__.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_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_releases_release_id_instances import Api +# from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace import Api from apollo_openapi.paths import PathValues -path = PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_RELEASE_ID_INSTANCES +path = PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py new file mode 100644 index 0000000..f30b367 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py @@ -0,0 +1,415 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO + +from . import path + +# Query params +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +InstanceAppIdSchema = schemas.StrSchema + + +class PageSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_minimum = 0 + + +class SizeSchema( + schemas.IntSchema +): + + + class MetaOapg: + inclusive_minimum = 0 +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'instanceAppId': typing.Union[InstanceAppIdSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_app_id = api_client.QueryParameter( + name="appId", + style=api_client.ParameterStyle.FORM, + schema=AppIdSchema, + required=True, + explode=True, +) +request_query_cluster_name = api_client.QueryParameter( + name="clusterName", + style=api_client.ParameterStyle.FORM, + schema=ClusterNameSchema, + required=True, + explode=True, +) +request_query_namespace_name = api_client.QueryParameter( + name="namespaceName", + style=api_client.ParameterStyle.FORM, + schema=NamespaceNameSchema, + required=True, + explode=True, +) +request_query_instance_app_id = api_client.QueryParameter( + name="instanceAppId", + style=api_client.ParameterStyle.FORM, + schema=InstanceAppIdSchema, + explode=True, +) +request_query_page = api_client.QueryParameter( + name="page", + style=api_client.ParameterStyle.FORM, + schema=PageSchema, + required=True, + explode=True, +) +request_query_size = api_client.QueryParameter( + name="size", + style=api_client.ParameterStyle.FORM, + schema=SizeSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, 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, +) +_auth = [ + 'ApiKeyAuth', +] +SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_by_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 _get_by_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 _get_by_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 _get_by_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, + ): + """ + 根据namespaceName查询实例(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, + ): + 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_app_id, + request_query_cluster_name, + request_query_namespace_name, + request_query_instance_app_id, + request_query_page, + request_query_size, + ): + 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 GetByNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_by_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 get_by_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 get_by_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 get_by_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_by_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._get_by_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_instances_by_namespace/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi new file mode 100644 index 0000000..084686b --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi @@ -0,0 +1,401 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO + +# Query params +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +InstanceAppIdSchema = schemas.StrSchema + + +class PageSchema( + schemas.IntSchema +): + pass + + +class SizeSchema( + schemas.IntSchema +): + pass +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + 'page': typing.Union[PageSchema, decimal.Decimal, int, ], + 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'instanceAppId': typing.Union[InstanceAppIdSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_app_id = api_client.QueryParameter( + name="appId", + style=api_client.ParameterStyle.FORM, + schema=AppIdSchema, + required=True, + explode=True, +) +request_query_cluster_name = api_client.QueryParameter( + name="clusterName", + style=api_client.ParameterStyle.FORM, + schema=ClusterNameSchema, + required=True, + explode=True, +) +request_query_namespace_name = api_client.QueryParameter( + name="namespaceName", + style=api_client.ParameterStyle.FORM, + schema=NamespaceNameSchema, + required=True, + explode=True, +) +request_query_instance_app_id = api_client.QueryParameter( + name="instanceAppId", + style=api_client.ParameterStyle.FORM, + schema=InstanceAppIdSchema, + explode=True, +) +request_query_page = api_client.QueryParameter( + name="page", + style=api_client.ParameterStyle.FORM, + schema=PageSchema, + required=True, + explode=True, +) +request_query_size = api_client.QueryParameter( + name="size", + style=api_client.ParameterStyle.FORM, + schema=SizeSchema, + required=True, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, 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, +) +SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_by_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 _get_by_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 _get_by_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 _get_by_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, + ): + """ + 根据namespaceName查询实例(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, + ): + 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_app_id, + request_query_cluster_name, + request_query_namespace_name, + request_query_instance_app_id, + request_query_page, + request_query_size, + ): + 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 GetByNamespace(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_by_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 get_by_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 get_by_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 get_by_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_by_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._get_by_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_instances_by_namespace_and_releases_not_in/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py new file mode 100644 index 0000000..cdb2b28 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py new file mode 100644 index 0000000..13fc970 --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py @@ -0,0 +1,404 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_instance_dto import OpenInstanceDTO + +from . import path + +# Query params +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +ReleaseIdsSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'releaseIds': typing.Union[ReleaseIdsSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_app_id = api_client.QueryParameter( + name="appId", + style=api_client.ParameterStyle.FORM, + schema=AppIdSchema, + required=True, + explode=True, +) +request_query_cluster_name = api_client.QueryParameter( + name="clusterName", + style=api_client.ParameterStyle.FORM, + schema=ClusterNameSchema, + required=True, + explode=True, +) +request_query_namespace_name = api_client.QueryParameter( + name="namespaceName", + style=api_client.ParameterStyle.FORM, + schema=NamespaceNameSchema, + required=True, + explode=True, +) +request_query_release_ids = api_client.QueryParameter( + name="releaseIds", + style=api_client.ParameterStyle.FORM, + schema=ReleaseIdsSchema, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, 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, +) +_auth = [ + 'ApiKeyAuth', +] + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenInstanceDTO']: + return OpenInstanceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_status_code_to_response = { + '200': _response_for_200, +} +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_by_releases_and_namespace_not_in_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 _get_by_releases_and_namespace_not_in_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 _get_by_releases_and_namespace_not_in_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 _get_by_releases_and_namespace_not_in_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询不在指定发布版本中的实例 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + ): + 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_app_id, + request_query_cluster_name, + request_query_namespace_name, + request_query_release_ids, + ): + 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 GetByReleasesAndNamespaceNotIn(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in_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._get_by_releases_and_namespace_not_in_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_instances_by_namespace_and_releases_not_in/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi new file mode 100644 index 0000000..d72216d --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi @@ -0,0 +1,396 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from apollo_openapi import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from apollo_openapi import schemas # noqa: F401 + +from apollo_openapi.model.open_instance_dto import OpenInstanceDTO + +# Query params +AppIdSchema = schemas.StrSchema +ClusterNameSchema = schemas.StrSchema +NamespaceNameSchema = schemas.StrSchema +ReleaseIdsSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + 'appId': typing.Union[AppIdSchema, str, ], + 'clusterName': typing.Union[ClusterNameSchema, str, ], + 'namespaceName': typing.Union[NamespaceNameSchema, str, ], + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'releaseIds': typing.Union[ReleaseIdsSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_app_id = api_client.QueryParameter( + name="appId", + style=api_client.ParameterStyle.FORM, + schema=AppIdSchema, + required=True, + explode=True, +) +request_query_cluster_name = api_client.QueryParameter( + name="clusterName", + style=api_client.ParameterStyle.FORM, + schema=ClusterNameSchema, + required=True, + explode=True, +) +request_query_namespace_name = api_client.QueryParameter( + name="namespaceName", + style=api_client.ParameterStyle.FORM, + schema=NamespaceNameSchema, + required=True, + explode=True, +) +request_query_release_ids = api_client.QueryParameter( + name="releaseIds", + style=api_client.ParameterStyle.FORM, + schema=ReleaseIdsSchema, + explode=True, +) +# Path params +EnvSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'env': typing.Union[EnvSchema, 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, +) + + +class SchemaFor200ResponseBodyApplicationJson( + schemas.ListSchema +): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['OpenInstanceDTO']: + return OpenInstanceDTO + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'SchemaFor200ResponseBodyApplicationJson': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'OpenInstanceDTO': + return super().__getitem__(i) + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationJson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _get_by_releases_and_namespace_not_in_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 _get_by_releases_and_namespace_not_in_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 _get_by_releases_and_namespace_not_in_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 _get_by_releases_and_namespace_not_in_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + 查询不在指定发布版本中的实例 (new added) + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_env, + ): + 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_app_id, + request_query_cluster_name, + request_query_namespace_name, + request_query_release_ids, + ): + 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 GetByReleasesAndNamespaceNotIn(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def get_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in( + 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_by_releases_and_namespace_not_in_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._get_by_releases_and_namespace_not_in_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_instances_by_release/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__init__.py new file mode 100644 index 0000000..b45c58c --- /dev/null +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from apollo_openapi.paths.openapi_v1_envs_env_instances_by_release import Api + +from apollo_openapi.paths import PathValues + +path = PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py similarity index 97% rename from python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py rename to python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py index 421e98c..78716c6 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.py +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py @@ -25,16 +25,18 @@ from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO from . import path # Query params +ReleaseIdSchema = schemas.Int64Schema PageSchema = schemas.IntSchema SizeSchema = schemas.IntSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { + 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], 'page': typing.Union[PageSchema, decimal.Decimal, int, ], 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], } @@ -51,6 +53,13 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) pass +request_query_release_id = api_client.QueryParameter( + name="releaseId", + style=api_client.ParameterStyle.FORM, + schema=ReleaseIdSchema, + required=True, + explode=True, +) request_query_page = api_client.QueryParameter( name="page", style=api_client.ParameterStyle.FORM, @@ -67,12 +76,10 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) ) # Path params EnvSchema = schemas.StrSchema -ReleaseIdSchema = schemas.IntSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', { 'env': typing.Union[EnvSchema, str, ], - 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], } ) RequestOptionalPathParams = typing_extensions.TypedDict( @@ -93,16 +100,10 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): schema=EnvSchema, required=True, ) -request_path_release_id = api_client.PathParameter( - name="releaseId", - style=api_client.ParameterStyle.SIMPLE, - schema=ReleaseIdSchema, - required=True, -) _auth = [ 'ApiKeyAuth', ] -SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenInstanceDTO +SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO @dataclass @@ -190,7 +191,6 @@ class instances _path_params = {} for parameter in ( request_path_env, - request_path_release_id, ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: @@ -203,6 +203,7 @@ class instances prefix_separator_iterator = None for parameter in ( + request_query_release_id, request_query_page, request_query_size, ): diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi similarity index 97% rename from python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi rename to python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi index 692c88d..d5a7684 100644 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_instances/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi @@ -25,14 +25,16 @@ import frozendict # noqa: F401 from apollo_openapi import schemas # noqa: F401 -from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO # Query params +ReleaseIdSchema = schemas.Int64Schema PageSchema = schemas.IntSchema SizeSchema = schemas.IntSchema RequestRequiredQueryParams = typing_extensions.TypedDict( 'RequestRequiredQueryParams', { + 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], 'page': typing.Union[PageSchema, decimal.Decimal, int, ], 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], } @@ -49,6 +51,13 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) pass +request_query_release_id = api_client.QueryParameter( + name="releaseId", + style=api_client.ParameterStyle.FORM, + schema=ReleaseIdSchema, + required=True, + explode=True, +) request_query_page = api_client.QueryParameter( name="page", style=api_client.ParameterStyle.FORM, @@ -65,12 +74,10 @@ request_query_size = api_client.QueryParameter( ) # Path params EnvSchema = schemas.StrSchema -ReleaseIdSchema = schemas.IntSchema RequestRequiredPathParams = typing_extensions.TypedDict( 'RequestRequiredPathParams', { 'env': typing.Union[EnvSchema, str, ], - 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], } ) RequestOptionalPathParams = typing_extensions.TypedDict( @@ -91,13 +98,7 @@ request_path_env = api_client.PathParameter( schema=EnvSchema, required=True, ) -request_path_release_id = api_client.PathParameter( - name="releaseId", - style=api_client.ParameterStyle.SIMPLE, - schema=ReleaseIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenPageDTOOpenInstanceDTO +SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO @dataclass @@ -182,7 +183,6 @@ class BaseApi(api_client.Api): _path_params = {} for parameter in ( request_path_env, - request_path_release_id, ): parameter_data = path_params.get(parameter.name, schemas.unset) if parameter_data is schemas.unset: @@ -195,6 +195,7 @@ class BaseApi(api_client.Api): prefix_separator_iterator = None for parameter in ( + request_query_release_id, request_query_page, request_query_size, ): 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 4d76411..baaf657 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 @@ -91,44 +91,7 @@ class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): _auth = [ 'ApiKeyAuth', ] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass 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 808fe6b..43e9cc1 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 @@ -86,44 +86,7 @@ request_path_release_id = api_client.PathParameter( schema=ReleaseIdSchema, required=True, ) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - all_of_0 = schemas.DictSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_organizations/get.py b/python/apollo_openapi/paths/openapi_v1_organizations/get.py index dec816d..62b8c7f 100644 --- a/python/apollo_openapi/paths/openapi_v1_organizations/get.py +++ b/python/apollo_openapi/paths/openapi_v1_organizations/get.py @@ -77,43 +77,7 @@ class ApiResponseFor200(api_client.ApiResponse): schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi b/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi index 33bd455..69189a9 100644 --- a/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi +++ b/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi @@ -72,43 +72,7 @@ _response_for_200 = api_client.OpenApiResponse( schema=SchemaFor200ResponseBodyApplicationJson), }, ) - - -class SchemaFor401ResponseBodyApplicationJson( - schemas.ComposedBase, - schemas.DictSchema -): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ExceptionResponse, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _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], - ) -> 'SchemaFor401ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) +SchemaFor401ResponseBodyApplicationJson = ExceptionResponse @dataclass diff --git a/python/docs/apis/tags/AppManagementApi.md b/python/docs/apis/tags/AppManagementApi.md index 8dba7b3..d42c138 100644 --- a/python/docs/apis/tags/AppManagementApi.md +++ b/python/docs/apis/tags/AppManagementApi.md @@ -10,16 +10,16 @@ Method | HTTP request | Description [**delete_app**](#delete_app) | **delete** /openapi/v1/apps/{appId} | 删除应用(new added) [**find_apps**](#find_apps) | **get** /openapi/v1/apps | 查找应用 (original openapi) [**find_apps_authorized**](#find_apps_authorized) | **get** /openapi/v1/apps/authorized | 获取当前Consumer授权的应用列表 (original openapi) -[**find_miss_envs**](#find_miss_envs) | **get** /openapi/v1/apps/{appId}/miss_envs | 查找缺失的环境(new added) +[**find_miss_envs**](#find_miss_envs) | **get** /openapi/v1/apps/{appId}/miss-envs | 查找缺失的环境(new added) [**get_app**](#get_app) | **get** /openapi/v1/apps/{appId} | 获取单个应用信息(new added) -[**get_app_nav_tree**](#get_app_nav_tree) | **get** /openapi/v1/apps/{appId}/navtree | 获取应用导航树(new added) -[**get_apps_by_self**](#get_apps_by_self) | **get** /openapi/v1/apps/by-self | 获取当前Consumer的应用列表(分页)(new added) -[**get_env_cluster_info**](#get_env_cluster_info) | **get** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) +[**get_apps_by_self**](#get_apps_by_self) | **get** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) +[**get_env_cluster_info**](#get_env_cluster_info) | **get** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) +[**get_env_clusters**](#get_env_clusters) | **get** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) [**update_app**](#update_app) | **put** /openapi/v1/apps/{appId} | 更新应用(new added) # **create_app** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_app(open_create_app_dto) +> OpenAppDTO create_app(open_create_app_dto) 创建应用 (original openapi) @@ -31,6 +31,7 @@ POST /openapi/v1/apps ```python import apollo_openapi from apollo_openapi.apis.tags import app_management_api +from apollo_openapi.model.open_app_dto import OpenAppDTO from apollo_openapi.model.exception_response import ExceptionResponse from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO from pprint import pprint @@ -72,6 +73,7 @@ with apollo_openapi.ApiClient(configuration) as api_client: org_name="org_name_example", owner_name="owner_name_example", owner_email="owner_email_example", + owner_display_name="owner_display_name_example", ), ) try: @@ -119,11 +121,10 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**OpenAppDTO**](../../models/OpenAppDTO.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | #### create_app.ApiResponseFor400 Name | Type | Description | Notes @@ -133,17 +134,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### create_app.ApiResponseFor403 Name | Type | Description | Notes @@ -153,17 +147,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -173,7 +160,7 @@ Class Name | Input Type | Accessed Type | Description | Notes # **create_app_in_env** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_app_in_env(envoperatoropen_app_dto) +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_app_in_env(envopen_app_dto) 在指定环境创建应用(new added) @@ -213,6 +200,36 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params = { 'env': "env_example", } + query_params = { + } + body = OpenAppDTO( + 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", + org_id="org_id_example", + org_name="org_name_example", + owner_name="owner_name_example", + owner_email="owner_email_example", + owner_display_name="owner_display_name_example", + ) + try: + # 在指定环境创建应用(new added) + api_response = api_instance.create_app_in_env( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->create_app_in_env: %s\n" % e) + + # example passing only optional values + path_params = { + 'env': "env_example", + } query_params = { 'operator': "operator_example", } @@ -227,6 +244,7 @@ with apollo_openapi.ApiClient(configuration) as api_client: org_name="org_name_example", owner_name="owner_name_example", owner_email="owner_email_example", + owner_display_name="owner_display_name_example", ) try: # 在指定环境创建应用(new added) @@ -265,7 +283,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -312,19 +330,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### create_app_in_env.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -333,17 +338,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### create_app_in_env.ApiResponseFor403 Name | Type | Description | Notes @@ -353,17 +351,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -373,7 +364,7 @@ Class Name | Input Type | Accessed Type | Description | Notes # **delete_app** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_app(app_idoperator) +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_app(app_id) 删除应用(new added) @@ -412,6 +403,22 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params = { 'appId': "appId_example", } + query_params = { + } + try: + # 删除应用(new added) + api_response = api_instance.delete_app( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->delete_app: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + } query_params = { 'operator': "operator_example", } @@ -441,7 +448,7 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -488,19 +495,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### delete_app.ApiResponseFor403 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -509,17 +503,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### delete_app.ApiResponseFor404 Name | Type | Description | Notes @@ -529,17 +516,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -658,17 +638,10 @@ body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor401ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -760,17 +733,10 @@ body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor401ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -780,11 +746,11 @@ Class Name | Input Type | Accessed Type | Description | Notes # **find_miss_envs** -> MultiResponseEntity find_miss_envs(app_id) +> [OpenMissEnvDTO] find_miss_envs(app_id) 查找缺失的环境(new added) -GET /openapi/v1/apps/{appId}/miss_envs +GET /openapi/v1/apps/{appId}/miss-envs ### Example @@ -792,8 +758,8 @@ GET /openapi/v1/apps/{appId}/miss_envs ```python import apollo_openapi from apollo_openapi.apis.tags import app_management_api +from apollo_openapi.model.open_miss_env_dto import OpenMissEnvDTO from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.multi_response_entity import MultiResponseEntity 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. @@ -869,10 +835,16 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MultiResponseEntity**](../../models/MultiResponseEntity.md) | | +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenMissEnvDTO**]({{complexTypePrefix}}OpenMissEnvDTO.md) | [**OpenMissEnvDTO**]({{complexTypePrefix}}OpenMissEnvDTO.md) | [**OpenMissEnvDTO**]({{complexTypePrefix}}OpenMissEnvDTO.md) | | #### find_miss_envs.ApiResponseFor404 Name | Type | Description | Notes @@ -882,17 +854,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1004,17 +969,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1022,13 +980,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_nav_tree** - -> MultiResponseEntity get_app_nav_tree(app_id) +# **get_apps_by_self** + +> [OpenAppDTO] get_apps_by_self(pagesize) -获取应用导航树(new added) +获取当前Consumer/User的应用列表(分页)(new added) -GET /openapi/v1/apps/{appId}/navtree +GET /openapi/v1/apps/by-self ### Example @@ -1036,7 +994,8 @@ GET /openapi/v1/apps/{appId}/navtree ```python import apollo_openapi from apollo_openapi.apis.tags import app_management_api -from apollo_openapi.model.multi_response_entity import MultiResponseEntity +from apollo_openapi.model.open_app_dto import OpenAppDTO +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. @@ -1060,50 +1019,61 @@ with apollo_openapi.ApiClient(configuration) as api_client: api_instance = app_management_api.AppManagementApi(api_client) # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", + query_params = { + 'page': 0, + 'size': 0, } try: - # 获取应用导航树(new added) - api_response = api_instance.get_app_nav_tree( - path_params=path_params, + # 获取当前Consumer/User的应用列表(分页)(new added) + api_response = api_instance.get_apps_by_self( + query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->get_app_nav_tree: %s\n" % e) + print("Exception when calling AppManagementApi->get_apps_by_self: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | +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 -### path_params -#### RequestPathParams +### query_params +#### RequestQueryParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | +page | PageSchema | | +size | SizeSchema | | -# AppIdSchema + +# PageSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -str, | str, | | +decimal.Decimal, int, | decimal.Decimal, | | + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_app_nav_tree.ApiResponseFor200) | 成功获取应用导航树 +200 | [ApiResponseFor200](#get_apps_by_self.ApiResponseFor200) | 成功获取Consumer的应用列表 +401 | [ApiResponseFor401](#get_apps_by_self.ApiResponseFor401) | 未授权访问 -#### get_app_nav_tree.ApiResponseFor200 +#### get_apps_by_self.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1111,9 +1081,28 @@ 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 +------------- | ------------- | ------------- | ------------- | ------------- +[**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | | + +#### get_apps_by_self.ApiResponseFor401 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor401ResponseBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**MultiResponseEntity**](../../models/MultiResponseEntity.md) | | +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | ### Authorization @@ -1122,13 +1111,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_apps_by_self** - -> [OpenAppDTO] get_apps_by_self(pagesize) +# **get_env_cluster_info** + +> [OpenEnvClusterInfo] get_env_cluster_info(app_id) -获取当前Consumer的应用列表(分页)(new added) +获取应用环境集群详情(new added) -GET /openapi/v1/apps/by-self +/openapi/v1/apps/{appId}/env-cluster-info ### Example @@ -1136,8 +1125,7 @@ GET /openapi/v1/apps/by-self ```python import apollo_openapi from apollo_openapi.apis.tags import app_management_api -from apollo_openapi.model.open_app_dto import OpenAppDTO -from apollo_openapi.model.exception_response import ExceptionResponse +from apollo_openapi.model.open_env_cluster_info import OpenEnvClusterInfo 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. @@ -1161,61 +1149,50 @@ with apollo_openapi.ApiClient(configuration) as api_client: api_instance = app_management_api.AppManagementApi(api_client) # example passing only required values which don't have defaults set - query_params = { - 'page': 0, - 'size': 0, + path_params = { + 'appId': "appId_example", } try: - # 获取当前Consumer的应用列表(分页)(new added) - api_response = api_instance.get_apps_by_self( - query_params=query_params, + # 获取应用环境集群详情(new added) + api_response = api_instance.get_env_cluster_info( + path_params=path_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->get_apps_by_self: %s\n" % e) + print("Exception when calling AppManagementApi->get_env_cluster_info: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | +path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned -### query_params -#### RequestQueryParams +### path_params +#### RequestPathParams Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -page | PageSchema | | -size | SizeSchema | | - - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | +appId | AppIdSchema | | -# SizeSchema +# AppIdSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | +str, | str, | | ### Return Types, Responses Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_apps_by_self.ApiResponseFor200) | 成功获取Consumer的应用列表 -401 | [ApiResponseFor401](#get_apps_by_self.ApiResponseFor401) | 未授权访问 +200 | [ApiResponseFor200](#get_env_cluster_info.ApiResponseFor200) | 成功获取应用环境集群详情 -#### get_apps_by_self.ApiResponseFor200 +#### get_env_cluster_info.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1232,27 +1209,7 @@ list, tuple, | tuple, | | ### Tuple Items Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -[**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | [**OpenAppDTO**]({{complexTypePrefix}}OpenAppDTO.md) | | - -#### get_apps_by_self.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | +[**OpenEnvClusterInfo**]({{complexTypePrefix}}OpenEnvClusterInfo.md) | [**OpenEnvClusterInfo**]({{complexTypePrefix}}OpenEnvClusterInfo.md) | [**OpenEnvClusterInfo**]({{complexTypePrefix}}OpenEnvClusterInfo.md) | | ### Authorization @@ -1260,13 +1217,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_env_cluster_info** - -> [OpenEnvClusterDTO] get_env_cluster_info(app_id) +# **get_env_clusters** + +> [OpenEnvClusterDTO] get_env_clusters(app_id) 获取应用的环境集群信息 (original openapi) -GET /openapi/v1/apps/{appId}/envclusters +GET /openapi/v1/apps/{appId}/envClusters ### Example @@ -1304,12 +1261,12 @@ with apollo_openapi.ApiClient(configuration) as api_client: } try: # 获取应用的环境集群信息 (original openapi) - api_response = api_instance.get_env_cluster_info( + api_response = api_instance.get_env_clusters( path_params=path_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->get_env_cluster_info: %s\n" % e) + print("Exception when calling AppManagementApi->get_env_clusters: %s\n" % e) ``` ### Parameters @@ -1340,10 +1297,10 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_env_cluster_info.ApiResponseFor200) | 成功获取应用环境集群信息 -404 | [ApiResponseFor404](#get_env_cluster_info.ApiResponseFor404) | 应用不存在 +200 | [ApiResponseFor200](#get_env_clusters.ApiResponseFor200) | 成功获取应用环境集群信息 +404 | [ApiResponseFor404](#get_env_clusters.ApiResponseFor404) | 应用不存在 -#### get_env_cluster_info.ApiResponseFor200 +#### get_env_clusters.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1362,7 +1319,7 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**OpenEnvClusterDTO**]({{complexTypePrefix}}OpenEnvClusterDTO.md) | [**OpenEnvClusterDTO**]({{complexTypePrefix}}OpenEnvClusterDTO.md) | [**OpenEnvClusterDTO**]({{complexTypePrefix}}OpenEnvClusterDTO.md) | | -#### get_env_cluster_info.ApiResponseFor404 +#### get_env_clusters.ApiResponseFor404 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | @@ -1370,17 +1327,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1390,7 +1340,7 @@ Class Name | Input Type | Accessed Type | Description | Notes # **update_app** -> OpenAppDTO update_app(app_idoperatoropen_app_dto) +> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} update_app(app_idopen_app_dto) 更新应用(new added) @@ -1430,6 +1380,36 @@ with apollo_openapi.ApiClient(configuration) as api_client: path_params = { 'appId': "appId_example", } + query_params = { + } + body = OpenAppDTO( + 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", + org_id="org_id_example", + org_name="org_name_example", + owner_name="owner_name_example", + owner_email="owner_email_example", + owner_display_name="owner_display_name_example", + ) + try: + # 更新应用(new added) + api_response = api_instance.update_app( + path_params=path_params, + query_params=query_params, + body=body, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling AppManagementApi->update_app: %s\n" % e) + + # example passing only optional values + path_params = { + 'appId': "appId_example", + } query_params = { 'operator': "operator_example", } @@ -1444,6 +1424,7 @@ with apollo_openapi.ApiClient(configuration) as api_client: org_name="org_name_example", owner_name="owner_name_example", owner_email="owner_email_example", + owner_display_name="owner_display_name_example", ) try: # 更新应用(new added) @@ -1482,7 +1463,7 @@ Type | Description | Notes Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | +operator | OperatorSchema | | optional # OperatorSchema @@ -1523,10 +1504,11 @@ body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppDTO**](../../models/OpenAppDTO.md) | | +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | #### update_app.ApiResponseFor400 Name | Type | Description | Notes @@ -1536,17 +1518,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### update_app.ApiResponseFor403 Name | Type | Description | Notes @@ -1556,17 +1531,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization diff --git a/python/docs/apis/tags/ClusterManagementApi.md b/python/docs/apis/tags/ClusterManagementApi.md index 3444585..bfcf95f 100644 --- a/python/docs/apis/tags/ClusterManagementApi.md +++ b/python/docs/apis/tags/ClusterManagementApi.md @@ -145,17 +145,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### create_cluster.ApiResponseFor403 Name | Type | Description | Notes @@ -165,17 +158,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -337,19 +323,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### delete_cluster.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -358,17 +331,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### delete_cluster.ApiResponseFor403 Name | Type | Description | Notes @@ -378,17 +344,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### delete_cluster.ApiResponseFor404 Name | Type | Description | Notes @@ -398,17 +357,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -538,17 +490,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization diff --git a/python/docs/apis/tags/InstanceManagementApi.md b/python/docs/apis/tags/InstanceManagementApi.md index 02cc397..bd6aa27 100644 --- a/python/docs/apis/tags/InstanceManagementApi.md +++ b/python/docs/apis/tags/InstanceManagementApi.md @@ -5,17 +5,202 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_by_release**](#get_by_release) | **get** /openapi/v1/envs/{env}/releases/{releaseId}/instances | 根据发布版本查询实例(支持分页) (new added) -[**get_by_releases_not_in**](#get_by_releases_not_in) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in | 查询不在指定发布版本中的实例 (new added) +[**get_by_namespace**](#get_by_namespace) | **get** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) +[**get_by_release**](#get_by_release) | **get** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) +[**get_by_releases_and_namespace_not_in**](#get_by_releases_and_namespace_not_in) | **get** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) [**get_instance_count_by_namespace**](#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) +# **get_by_namespace** + +> OpenInstancePageDTO get_by_namespace(envapp_idcluster_namenamespace_name) + +根据namespaceName查询实例(new added) + +### Example + +* Api Key Authentication (ApiKeyAuth): +```python +import apollo_openapi +from apollo_openapi.apis.tags import instance_management_api +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO +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 = instance_management_api.InstanceManagementApi(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'env': "env_example", + } + query_params = { + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'page': 0, + 'size': 0, + } + try: + # 根据namespaceName查询实例(new added) + api_response = api_instance.get_by_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling InstanceManagementApi->get_by_namespace: %s\n" % e) + + # example passing only optional values + path_params = { + 'env': "env_example", + } + query_params = { + 'appId': "appId_example", + 'clusterName': "clusterName_example", + 'namespaceName': "namespaceName_example", + 'instanceAppId': "instanceAppId_example", + 'page': 0, + 'size': 0, + } + try: + # 根据namespaceName查询实例(new added) + api_response = api_instance.get_by_namespace( + path_params=path_params, + query_params=query_params, + ) + pprint(api_response) + except apollo_openapi.ApiException as e: + print("Exception when calling InstanceManagementApi->get_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 +------------- | ------------- | ------------- | ------------- +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +instanceAppId | InstanceAppIdSchema | | optional +page | PageSchema | | +size | SizeSchema | | + + +# AppIdSchema + +## 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, | | + +# InstanceAppIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +# PageSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 + +# SizeSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | + +# EnvSchema + +## 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_by_namespace.ApiResponseFor200) | + +#### get_by_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 +------------- | ------------- | ------------- +[**OpenInstancePageDTO**](../../models/OpenInstancePageDTO.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_by_release** -> OpenPageDTOOpenInstanceDTO get_by_release(envrelease_idpagesize) +> OpenInstancePageDTO get_by_release(envrelease_idpagesize) 根据发布版本查询实例(支持分页) (new added) -GET /openapi/v1/envs/{env}/releases/{releaseId}/instances +GET /openapi/v1/envs/{env}/instances/by-release ### Example @@ -23,7 +208,7 @@ GET /openapi/v1/envs/{env}/releases/{releaseId}/instances ```python import apollo_openapi from apollo_openapi.apis.tags import instance_management_api -from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO 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. @@ -49,9 +234,9 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'env': "env_example", - 'releaseId': 1, } query_params = { + 'releaseId': 1, 'page': 0, 'size': 20, } @@ -81,10 +266,18 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +releaseId | ReleaseIdSchema | | page | PageSchema | | size | SizeSchema | | +# ReleaseIdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer + # PageSchema ## Model Type Info @@ -105,7 +298,6 @@ decimal.Decimal, int, | decimal.Decimal, | | Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- env | EnvSchema | | -releaseId | ReleaseIdSchema | | # EnvSchema @@ -114,13 +306,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ReleaseIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - ### Return Types, Responses Code | Class | Description @@ -138,7 +323,7 @@ headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenPageDTOOpenInstanceDTO**](../../models/OpenPageDTOOpenInstanceDTO.md) | | +[**OpenInstancePageDTO**](../../models/OpenInstancePageDTO.md) | | ### Authorization @@ -147,14 +332,12 @@ 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_by_releases_not_in** - -> [OpenInstanceDTO] get_by_releases_not_in(envapp_idcluster_namenamespace_name) +# **get_by_releases_and_namespace_not_in** + +> [OpenInstanceDTO] get_by_releases_and_namespace_not_in(envapp_idcluster_namenamespace_name) 查询不在指定发布版本中的实例 (new added) -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 - ### Example * Api Key Authentication (ApiKeyAuth): @@ -187,41 +370,41 @@ with apollo_openapi.ApiClient(configuration) as api_client: # example passing only required values which don't have defaults set path_params = { 'env': "env_example", + } + query_params = { 'appId': "appId_example", 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", } - query_params = { - } try: # 查询不在指定发布版本中的实例 (new added) - api_response = api_instance.get_by_releases_not_in( + api_response = api_instance.get_by_releases_and_namespace_not_in( path_params=path_params, query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->get_by_releases_not_in: %s\n" % e) + print("Exception when calling InstanceManagementApi->get_by_releases_and_namespace_not_in: %s\n" % e) # example passing only optional values path_params = { 'env': "env_example", + } + query_params = { 'appId': "appId_example", 'clusterName': "clusterName_example", 'namespaceName': "namespaceName_example", - } - query_params = { - 'excludeReleases': "excludeReleases_example", + 'releaseIds': "releaseIds_example", } try: # 查询不在指定发布版本中的实例 (new added) - api_response = api_instance.get_by_releases_not_in( + api_response = api_instance.get_by_releases_and_namespace_not_in( path_params=path_params, query_params=query_params, ) pprint(api_response) except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->get_by_releases_not_in: %s\n" % e) + print("Exception when calling InstanceManagementApi->get_by_releases_and_namespace_not_in: %s\n" % e) ``` ### Parameters @@ -239,48 +422,48 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -excludeReleases | ExcludeReleasesSchema | | optional +appId | AppIdSchema | | +clusterName | ClusterNameSchema | | +namespaceName | NamespaceNameSchema | | +releaseIds | ReleaseIdsSchema | | optional -# ExcludeReleasesSchema +# AppIdSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -env | EnvSchema | | -appId | AppIdSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | - -# EnvSchema +# ClusterNameSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# AppIdSchema +# NamespaceNameSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# ClusterNameSchema +# ReleaseIdsSchema ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | -# NamespaceNameSchema +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +env | EnvSchema | | + +# EnvSchema ## Model Type Info Input Type | Accessed Type | Description | Notes @@ -292,9 +475,9 @@ str, | str, | | Code | Class | Description ------------- | ------------- | ------------- n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_by_releases_not_in.ApiResponseFor200) | +200 | [ApiResponseFor200](#get_by_releases_and_namespace_not_in.ApiResponseFor200) | -#### get_by_releases_not_in.ApiResponseFor200 +#### get_by_releases_and_namespace_not_in.ApiResponseFor200 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | diff --git a/python/docs/apis/tags/ItemManagementApi.md b/python/docs/apis/tags/ItemManagementApi.md index 3f7fdf4..6da7f23 100644 --- a/python/docs/apis/tags/ItemManagementApi.md +++ b/python/docs/apis/tags/ItemManagementApi.md @@ -185,19 +185,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## 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,17 +193,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -564,17 +544,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### create_item.ApiResponseFor403 Name | Type | Description | Notes @@ -584,17 +557,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -752,19 +718,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -921,19 +874,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -942,7 +882,7 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | # **find_items_by_namespace** -> OpenPageDTOOpenItemDTO find_items_by_namespace(app_idenvcluster_namenamespace_namepagesize) +> OpenItemPageDTO find_items_by_namespace(app_idenvcluster_namenamespace_namepagesize) 获取命名空间下的配置项列表 (original openapi) @@ -954,7 +894,7 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | ```python import apollo_openapi from apollo_openapi.apis.tags import item_management_api -from apollo_openapi.model.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +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 @@ -1089,7 +1029,7 @@ headers | Unset | headers were not defined | # SchemaFor200ResponseBodyApplicationJson Type | Description | Notes ------------- | ------------- | ------------- -[**OpenPageDTOOpenItemDTO**](../../models/OpenPageDTOOpenItemDTO.md) | | +[**OpenItemPageDTO**](../../models/OpenItemPageDTO.md) | | #### find_items_by_namespace.ApiResponseFor404 @@ -1100,17 +1040,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1264,17 +1197,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1422,17 +1348,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1580,17 +1499,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1742,19 +1654,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### revert_items.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -1763,17 +1662,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### revert_items.ApiResponseFor403 Name | Type | Description | Notes @@ -1783,17 +1675,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1979,19 +1864,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### sync_items.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -2000,17 +1872,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### sync_items.ApiResponseFor403 Name | Type | Description | Notes @@ -2020,17 +1885,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -2214,19 +2072,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### update_item.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -2235,17 +2080,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### update_item.ApiResponseFor403 Name | Type | Description | Notes @@ -2255,17 +2093,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### update_item.ApiResponseFor404 Name | Type | Description | Notes @@ -2275,17 +2106,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -2469,19 +2293,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### update_item_by_encoded_key.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -2490,17 +2301,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### update_item_by_encoded_key.ApiResponseFor403 Name | Type | Description | Notes @@ -2510,17 +2314,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### update_item_by_encoded_key.ApiResponseFor404 Name | Type | Description | Notes @@ -2530,17 +2327,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -2693,19 +2483,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - #### validate_items.ApiResponseFor400 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -2714,17 +2491,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization diff --git a/python/docs/apis/tags/NamespaceBranchManagementApi.md b/python/docs/apis/tags/NamespaceBranchManagementApi.md index d211a8d..8dd034a 100644 --- a/python/docs/apis/tags/NamespaceBranchManagementApi.md +++ b/python/docs/apis/tags/NamespaceBranchManagementApi.md @@ -309,19 +309,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -459,17 +446,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -979,19 +959,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## 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/NamespaceManagementApi.md b/python/docs/apis/tags/NamespaceManagementApi.md index a767b6e..dadcbbb 100644 --- a/python/docs/apis/tags/NamespaceManagementApi.md +++ b/python/docs/apis/tags/NamespaceManagementApi.md @@ -270,17 +270,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### create_namespace.ApiResponseFor403 Name | Type | Description | Notes @@ -290,17 +283,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -431,19 +417,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) @@ -591,19 +564,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## 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/OrganizationManagementApi.md b/python/docs/apis/tags/OrganizationManagementApi.md index 3dcf7f4..6100c69 100644 --- a/python/docs/apis/tags/OrganizationManagementApi.md +++ b/python/docs/apis/tags/OrganizationManagementApi.md @@ -93,17 +93,10 @@ body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor401ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization diff --git a/python/docs/apis/tags/ReleaseManagementApi.md b/python/docs/apis/tags/ReleaseManagementApi.md index 998278b..ca6c3af 100644 --- a/python/docs/apis/tags/ReleaseManagementApi.md +++ b/python/docs/apis/tags/ReleaseManagementApi.md @@ -474,17 +474,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### create_release.ApiResponseFor403 Name | Type | Description | Notes @@ -494,17 +487,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1076,17 +1062,10 @@ body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor404ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1273,17 +1252,10 @@ body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor400ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | #### merge.ApiResponseFor403 Name | Type | Description | Notes @@ -1293,17 +1265,10 @@ body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | # SchemaFor403ResponseBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ExceptionResponse**](../../models/ExceptionResponse.md) | | -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ExceptionResponse]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | [**ExceptionResponse**]({{complexTypePrefix}}ExceptionResponse.md) | | ### Authorization @@ -1434,19 +1399,6 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- dict, frozendict.frozendict, | frozendict.frozendict, | | -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - ### Authorization [ApiKeyAuth](../../../README.md#ApiKeyAuth) diff --git a/python/docs/models/ExceptionResponse.md b/python/docs/models/ExceptionResponse.md index f67260e..e8e6d53 100644 --- a/python/docs/models/ExceptionResponse.md +++ b/python/docs/models/ExceptionResponse.md @@ -1,15 +1,17 @@ # apollo_openapi.model.exception_response.ExceptionResponse -错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) - ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | 错误响应对象,表示为 Map<String,Object>。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) | +dict, frozendict.frozendict, | frozendict.frozendict, | | ### Dictionary Keys Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] +**status** | decimal.Decimal, int, | decimal.Decimal, | HTTP 状态码 | [optional] +**message** | str, | str, | 错误信息 | [optional] +**timestamp** | str, datetime, | str, | 时间戳 | [optional] value must conform to RFC-3339 date-time +**exception** | 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/OpenAppDTO.md b/python/docs/models/OpenAppDTO.md index 3d231bb..b3f6472 100644 --- a/python/docs/models/OpenAppDTO.md +++ b/python/docs/models/OpenAppDTO.md @@ -20,6 +20,7 @@ Key | Input Type | Accessed Type | Description | Notes **orgName** | str, | str, | 组织名称,应用所属组织的显示名称 | [optional] **ownerName** | str, | str, | 应用负责人姓名,应用的主要负责人 | [optional] **ownerEmail** | str, | str, | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] +**ownerDisplayName** | 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/OpenEnvClusterInfo.md b/python/docs/models/OpenEnvClusterInfo.md index 2841e2c..a23fa93 100644 --- a/python/docs/models/OpenEnvClusterInfo.md +++ b/python/docs/models/OpenEnvClusterInfo.md @@ -8,6 +8,8 @@ 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] **env** | str, | str, | 环境标识 | [optional] **[clusters](#clusters)** | 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] diff --git a/python/docs/models/OpenPageDTOOpenInstanceDTO.md b/python/docs/models/OpenInstancePageDTO.md similarity index 90% rename from python/docs/models/OpenPageDTOOpenInstanceDTO.md rename to python/docs/models/OpenInstancePageDTO.md index 9a37928..0e0aa66 100644 --- a/python/docs/models/OpenPageDTOOpenInstanceDTO.md +++ b/python/docs/models/OpenInstancePageDTO.md @@ -1,4 +1,4 @@ -# apollo_openapi.model.open_page_dto_open_instance_dto.OpenPageDTOOpenInstanceDTO +# apollo_openapi.model.open_instance_page_dto.OpenInstancePageDTO 分页实例数据传输对象,用于返回分页查询的实例列表结果 @@ -13,10 +13,10 @@ Key | Input Type | Accessed Type | Description | Notes **page** | decimal.Decimal, int, | decimal.Decimal, | 当前页码,从0开始计数 | [optional] **size** | decimal.Decimal, int, | decimal.Decimal, | 每页显示的记录数量 | [optional] **total** | decimal.Decimal, int, | decimal.Decimal, | 总记录数,符合查询条件的实例总数量 | [optional] value must be a 64 bit integer -**[content](#content)** | list, tuple, | tuple, | 当前页的实例列表,包含具体的实例数据 | [optional] +**[instances](#instances)** | 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] -# content +# instances 当前页的实例列表,包含具体的实例数据 diff --git a/python/docs/models/OpenPageDTOOpenItemDTO.md b/python/docs/models/OpenItemPageDTO.md similarity index 96% rename from python/docs/models/OpenPageDTOOpenItemDTO.md rename to python/docs/models/OpenItemPageDTO.md index 385958c..773b7e8 100644 --- a/python/docs/models/OpenPageDTOOpenItemDTO.md +++ b/python/docs/models/OpenItemPageDTO.md @@ -1,4 +1,4 @@ -# apollo_openapi.model.open_page_dto_open_item_dto.OpenPageDTOOpenItemDTO +# apollo_openapi.model.open_item_page_dto.OpenItemPageDTO 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 diff --git a/python/docs/models/OpenMissEnvDTO.md b/python/docs/models/OpenMissEnvDTO.md new file mode 100644 index 0000000..307f7b3 --- /dev/null +++ b/python/docs/models/OpenMissEnvDTO.md @@ -0,0 +1,15 @@ +# apollo_openapi.model.open_miss_env_dto.OpenMissEnvDTO + +## 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] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/test/test_models/test_open_page_dto_open_item_dto.py b/python/test/test_models/test_open_instance_page_dto.py similarity index 84% rename from python/test/test_models/test_open_page_dto_open_item_dto.py rename to python/test/test_models/test_open_instance_page_dto.py index 5b483ae..c111ddc 100644 --- a/python/test/test_models/test_open_page_dto_open_item_dto.py +++ b/python/test/test_models/test_open_instance_page_dto.py @@ -12,12 +12,12 @@ import unittest import apollo_openapi -from apollo_openapi.model.open_page_dto_open_item_dto import OpenPageDTOOpenItemDTO +from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO from apollo_openapi import configuration -class TestOpenPageDTOOpenItemDTO(unittest.TestCase): - """OpenPageDTOOpenItemDTO unit test stubs""" +class TestOpenInstancePageDTO(unittest.TestCase): + """OpenInstancePageDTO unit test stubs""" _configuration = configuration.Configuration() diff --git a/python/test/test_models/test_open_page_dto_open_instance_dto.py b/python/test/test_models/test_open_item_page_dto.py similarity index 83% rename from python/test/test_models/test_open_page_dto_open_instance_dto.py rename to python/test/test_models/test_open_item_page_dto.py index 4af7f17..5e9223f 100644 --- a/python/test/test_models/test_open_page_dto_open_instance_dto.py +++ b/python/test/test_models/test_open_item_page_dto.py @@ -12,12 +12,12 @@ import unittest import apollo_openapi -from apollo_openapi.model.open_page_dto_open_instance_dto import OpenPageDTOOpenInstanceDTO +from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO from apollo_openapi import configuration -class TestOpenPageDTOOpenInstanceDTO(unittest.TestCase): - """OpenPageDTOOpenInstanceDTO unit test stubs""" +class TestOpenItemPageDTO(unittest.TestCase): + """OpenItemPageDTO unit test stubs""" _configuration = configuration.Configuration() diff --git a/python/test/test_models/test_open_miss_env_dto.py b/python/test/test_models/test_open_miss_env_dto.py new file mode 100644 index 0000000..c0d950d --- /dev/null +++ b/python/test/test_models/test_open_miss_env_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_miss_env_dto import OpenMissEnvDTO +from apollo_openapi import configuration + + +class TestOpenMissEnvDTO(unittest.TestCase): + """OpenMissEnvDTO unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_apps_app_id_navtree/__init__.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/test_get.py similarity index 68% rename from python/test/test_paths/test_openapi_v1_apps_app_id_navtree/test_get.py rename to python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/test_get.py index 1071c95..dcdaa0c 100644 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_navtree/test_get.py +++ b/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/test_get.py @@ -12,16 +12,16 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_apps_app_id_navtree import get # noqa: E501 +from apollo_openapi.paths.openapi_v1_apps_app_id_env_cluster_info import get # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1AppsAppIdNavtree(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1AppsAppIdEnvClusterInfo(ApiTestMixin, unittest.TestCase): """ - OpenapiV1AppsAppIdNavtree unit test stubs - 获取应用导航树(new added) # noqa: E501 + OpenapiV1AppsAppIdEnvClusterInfo unit test stubs + 获取应用环境集群详情(new added) # noqa: E501 """ _configuration = configuration.Configuration() diff --git a/python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py b/python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py index e665891..86daebf 100644 --- a/python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py +++ b/python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py @@ -21,7 +21,7 @@ class TestOpenapiV1AppsBySelf(ApiTestMixin, unittest.TestCase): """ OpenapiV1AppsBySelf unit test stubs - 获取当前Consumer的应用列表(分页)(new added) # noqa: E501 + 获取当前Consumer/User的应用列表(分页)(new added) # noqa: E501 """ _configuration = configuration.Configuration() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/__init__.py similarity index 100% rename from python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/__init__.py rename to python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/__init__.py diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/test_get.py new file mode 100644 index 0000000..5d697fc --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_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_instances_by_namespace import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvInstancesByNamespace(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvInstancesByNamespace unit test stubs + 根据namespaceName查询实例(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_instances_by_namespace_and_releases_not_in/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/test_get.py new file mode 100644 index 0000000..0281ca1 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/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_instances_by_namespace_and_releases_not_in import get # noqa: E501 +from apollo_openapi import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestOpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn(ApiTestMixin, unittest.TestCase): + """ + OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn unit test stubs + 查询不在指定发布版本中的实例 (new added) # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + +if __name__ == '__main__': + unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py @@ -0,0 +1 @@ + diff --git a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/test_get.py similarity index 73% rename from python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/test_get.py rename to python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/test_get.py index 74ea0b0..1ebac62 100644 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_instances/test_get.py +++ b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/test_get.py @@ -12,15 +12,15 @@ import urllib3 import apollo_openapi -from apollo_openapi.paths.openapi_v1_envs_env_releases_release_id_instances import get # noqa: E501 +from apollo_openapi.paths.openapi_v1_envs_env_instances_by_release import get # noqa: E501 from apollo_openapi import configuration, schemas, api_client from .. import ApiTestMixin -class TestOpenapiV1EnvsEnvReleasesReleaseIdInstances(ApiTestMixin, unittest.TestCase): +class TestOpenapiV1EnvsEnvInstancesByRelease(ApiTestMixin, unittest.TestCase): """ - OpenapiV1EnvsEnvReleasesReleaseIdInstances unit test stubs + OpenapiV1EnvsEnvInstancesByRelease unit test stubs 根据发布版本查询实例(支持分页) (new added) # noqa: E501 """ _configuration = configuration.Configuration() diff --git a/rust/.openapi-generator/FILES b/rust/.openapi-generator/FILES index 1942bd2..eba863a 100644 --- a/rust/.openapi-generator/FILES +++ b/rust/.openapi-generator/FILES @@ -3,6 +3,7 @@ .travis.yml Cargo.toml README.md +docs/ExceptionResponse.md docs/KvEntity.md docs/MultiResponseEntity.md docs/NamespaceGrayDelReleaseDto.md @@ -17,17 +18,18 @@ docs/OpenGrayReleaseRuleDto.md docs/OpenGrayReleaseRuleItemDto.md docs/OpenInstanceConfigDto.md docs/OpenInstanceDto.md +docs/OpenInstancePageDto.md docs/OpenItemChangeSets.md docs/OpenItemDiffs.md docs/OpenItemDto.md +docs/OpenItemPageDto.md +docs/OpenMissEnvDto.md docs/OpenNamespaceDto.md docs/OpenNamespaceIdentifier.md docs/OpenNamespaceLockDto.md docs/OpenNamespaceSyncModel.md docs/OpenNamespaceTextModel.md docs/OpenOrganizationDto.md -docs/OpenPageDtoOpenInstanceDto.md -docs/OpenPageDtoOpenItemDto.md docs/OpenReleaseBo.md docs/OpenReleaseDto.md docs/RichResponseEntity.md @@ -35,6 +37,7 @@ git_push.sh src/apis/configuration.rs src/apis/mod.rs src/lib.rs +src/models/exception_response.rs src/models/kv_entity.rs src/models/mod.rs src/models/multi_response_entity.rs @@ -50,17 +53,18 @@ src/models/open_gray_release_rule_dto.rs src/models/open_gray_release_rule_item_dto.rs src/models/open_instance_config_dto.rs src/models/open_instance_dto.rs +src/models/open_instance_page_dto.rs src/models/open_item_change_sets.rs src/models/open_item_diffs.rs src/models/open_item_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_identifier.rs src/models/open_namespace_lock_dto.rs src/models/open_namespace_sync_model.rs src/models/open_namespace_text_model.rs src/models/open_organization_dto.rs -src/models/open_page_dto_open_instance_dto.rs -src/models/open_page_dto_open_item_dto.rs src/models/open_release_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 be1548f..79ddd90 100644 --- a/rust/README.md +++ b/rust/README.md @@ -44,6 +44,7 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [ExceptionResponse](docs/ExceptionResponse.md) - [KvEntity](docs/KvEntity.md) - [MultiResponseEntity](docs/MultiResponseEntity.md) - [NamespaceGrayDelReleaseDto](docs/NamespaceGrayDelReleaseDto.md) @@ -58,17 +59,18 @@ Class | Method | HTTP request | Description - [OpenGrayReleaseRuleItemDto](docs/OpenGrayReleaseRuleItemDto.md) - [OpenInstanceConfigDto](docs/OpenInstanceConfigDto.md) - [OpenInstanceDto](docs/OpenInstanceDto.md) + - [OpenInstancePageDto](docs/OpenInstancePageDto.md) - [OpenItemChangeSets](docs/OpenItemChangeSets.md) - [OpenItemDiffs](docs/OpenItemDiffs.md) - [OpenItemDto](docs/OpenItemDto.md) + - [OpenItemPageDto](docs/OpenItemPageDto.md) + - [OpenMissEnvDto](docs/OpenMissEnvDto.md) - [OpenNamespaceDto](docs/OpenNamespaceDto.md) - [OpenNamespaceIdentifier](docs/OpenNamespaceIdentifier.md) - [OpenNamespaceLockDto](docs/OpenNamespaceLockDto.md) - [OpenNamespaceSyncModel](docs/OpenNamespaceSyncModel.md) - [OpenNamespaceTextModel](docs/OpenNamespaceTextModel.md) - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPageDtoOpenInstanceDto](docs/OpenPageDtoOpenInstanceDto.md) - - [OpenPageDtoOpenItemDto](docs/OpenPageDtoOpenItemDto.md) - [OpenReleaseBo](docs/OpenReleaseBo.md) - [OpenReleaseDto](docs/OpenReleaseDto.md) - [RichResponseEntity](docs/RichResponseEntity.md) diff --git a/rust/docs/ExceptionResponse.md b/rust/docs/ExceptionResponse.md new file mode 100644 index 0000000..b00f01a --- /dev/null +++ b/rust/docs/ExceptionResponse.md @@ -0,0 +1,12 @@ +# ExceptionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | Option<**i32**> | HTTP 状态码 | [optional] +**message** | Option<**String**> | 错误信息 | [optional] +**timestamp** | Option<**String**> | 时间戳 | [optional] +**exception** | Option<**String**> | 错误类名 | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenAppDto.md b/rust/docs/OpenAppDto.md index 7397fbb..bfe2dae 100644 --- a/rust/docs/OpenAppDto.md +++ b/rust/docs/OpenAppDto.md @@ -14,5 +14,6 @@ Name | Type | Description | Notes **org_name** | Option<**String**> | 组织名称,应用所属组织的显示名称 | [optional] **owner_name** | Option<**String**> | 应用负责人姓名,应用的主要负责人 | [optional] **owner_email** | Option<**String**> | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] +**owner_display_name** | Option<**String**> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenEnvClusterInfo.md b/rust/docs/OpenEnvClusterInfo.md index 0d6bb81..37bb4f9 100644 --- a/rust/docs/OpenEnvClusterInfo.md +++ b/rust/docs/OpenEnvClusterInfo.md @@ -4,6 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**code** | Option<**i32**> | 查询状态码 | [optional] +**message** | Option<**String**> | 相关信息 | [optional] **env** | Option<**String**> | 环境标识 | [optional] **clusters** | Option<[**Vec**](OpenClusterDTO.md)> | 集群信息列表 | [optional] diff --git a/rust/docs/OpenPageDtoOpenInstanceDto.md b/rust/docs/OpenInstancePageDto.md similarity index 73% rename from rust/docs/OpenPageDtoOpenInstanceDto.md rename to rust/docs/OpenInstancePageDto.md index 2d94b0b..89fb230 100644 --- a/rust/docs/OpenPageDtoOpenInstanceDto.md +++ b/rust/docs/OpenInstancePageDto.md @@ -1,4 +1,4 @@ -# OpenPageDtoOpenInstanceDto +# OpenInstancePageDto ## Properties @@ -7,6 +7,6 @@ Name | Type | Description | Notes **page** | Option<**i32**> | 当前页码,从0开始计数 | [optional] **size** | Option<**i32**> | 每页显示的记录数量 | [optional] **total** | Option<**i64**> | 总记录数,符合查询条件的实例总数量 | [optional] -**content** | Option<[**Vec**](OpenInstanceDTO.md)> | 当前页的实例列表,包含具体的实例数据 | [optional] +**instances** | Option<[**Vec**](OpenInstanceDTO.md)> | 当前页的实例列表,包含具体的实例数据 | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenPageDtoOpenItemDto.md b/rust/docs/OpenItemPageDto.md similarity index 96% rename from rust/docs/OpenPageDtoOpenItemDto.md rename to rust/docs/OpenItemPageDto.md index 83ea96a..e17fa4d 100644 --- a/rust/docs/OpenPageDtoOpenItemDto.md +++ b/rust/docs/OpenItemPageDto.md @@ -1,4 +1,4 @@ -# OpenPageDtoOpenItemDto +# OpenItemPageDto ## Properties diff --git a/rust/docs/OpenMissEnvDto.md b/rust/docs/OpenMissEnvDto.md new file mode 100644 index 0000000..d4ee72d --- /dev/null +++ b/rust/docs/OpenMissEnvDto.md @@ -0,0 +1,10 @@ +# OpenMissEnvDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**i32**> | 查询状态码 | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/src/models/exception_response.rs b/rust/src/models/exception_response.rs new file mode 100644 index 0000000..0042d8f --- /dev/null +++ b/rust/src/models/exception_response.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 ExceptionResponse { + /// HTTP 状态码 + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + /// 错误信息 + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, + /// 时间戳 + #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] + pub timestamp: Option, + /// 错误类名 + #[serde(rename = "exception", skip_serializing_if = "Option::is_none")] + pub exception: Option, +} + +impl ExceptionResponse { + pub fn new() -> ExceptionResponse { + ExceptionResponse { + status: None, + message: None, + timestamp: None, + exception: None, + } + } +} diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs index 403e617..eebdfd4 100644 --- a/rust/src/models/mod.rs +++ b/rust/src/models/mod.rs @@ -1,3 +1,5 @@ +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; @@ -26,12 +28,18 @@ pub mod open_instance_config_dto; pub use self::open_instance_config_dto::OpenInstanceConfigDto; pub mod open_instance_dto; pub use self::open_instance_dto::OpenInstanceDto; +pub mod open_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_dto; pub use self::open_item_dto::OpenItemDto; +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_identifier; @@ -44,10 +52,6 @@ pub mod open_namespace_text_model; pub use self::open_namespace_text_model::OpenNamespaceTextModel; pub mod open_organization_dto; pub use self::open_organization_dto::OpenOrganizationDto; -pub mod open_page_dto_open_instance_dto; -pub use self::open_page_dto_open_instance_dto::OpenPageDtoOpenInstanceDto; -pub mod open_page_dto_open_item_dto; -pub use self::open_page_dto_open_item_dto::OpenPageDtoOpenItemDto; pub mod open_release_bo; pub use self::open_release_bo::OpenReleaseBo; pub mod open_release_dto; diff --git a/rust/src/models/open_app_dto.rs b/rust/src/models/open_app_dto.rs index 37b1177..0a15880 100644 --- a/rust/src/models/open_app_dto.rs +++ b/rust/src/models/open_app_dto.rs @@ -44,6 +44,8 @@ pub struct OpenAppDto { /// 应用负责人邮箱地址,用于接收应用相关通知 #[serde(rename = "ownerEmail", skip_serializing_if = "Option::is_none")] pub owner_email: Option, + #[serde(rename = "ownerDisplayName", skip_serializing_if = "Option::is_none")] + pub owner_display_name: Option, } impl OpenAppDto { @@ -60,6 +62,7 @@ impl OpenAppDto { org_name: None, owner_name: None, owner_email: None, + owner_display_name: None, } } } diff --git a/rust/src/models/open_env_cluster_info.rs b/rust/src/models/open_env_cluster_info.rs index 3139b52..20d8a03 100644 --- a/rust/src/models/open_env_cluster_info.rs +++ b/rust/src/models/open_env_cluster_info.rs @@ -13,6 +13,12 @@ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct OpenEnvClusterInfo { + /// 查询状态码 + #[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 = "env", skip_serializing_if = "Option::is_none")] pub env: Option, @@ -24,6 +30,8 @@ pub struct OpenEnvClusterInfo { impl OpenEnvClusterInfo { pub fn new() -> OpenEnvClusterInfo { OpenEnvClusterInfo { + code: None, + message: None, env: None, clusters: None, } diff --git a/rust/src/models/open_page_dto_open_instance_dto.rs b/rust/src/models/open_instance_page_dto.rs similarity index 78% rename from rust/src/models/open_page_dto_open_instance_dto.rs rename to rust/src/models/open_instance_page_dto.rs index 816ece7..bbf7467 100644 --- a/rust/src/models/open_page_dto_open_instance_dto.rs +++ b/rust/src/models/open_instance_page_dto.rs @@ -8,12 +8,12 @@ * Generated by: https://openapi-generator.tech */ -/// OpenPageDtoOpenInstanceDto : 分页实例数据传输对象,用于返回分页查询的实例列表结果 +/// OpenInstancePageDto : 分页实例数据传输对象,用于返回分页查询的实例列表结果 #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenPageDtoOpenInstanceDto { +pub struct OpenInstancePageDto { /// 当前页码,从0开始计数 #[serde(rename = "page", skip_serializing_if = "Option::is_none")] pub page: Option, @@ -24,18 +24,18 @@ pub struct OpenPageDtoOpenInstanceDto { #[serde(rename = "total", skip_serializing_if = "Option::is_none")] pub total: Option, /// 当前页的实例列表,包含具体的实例数据 - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, + #[serde(rename = "instances", skip_serializing_if = "Option::is_none")] + pub instances: Option>, } -impl OpenPageDtoOpenInstanceDto { +impl OpenInstancePageDto { /// 分页实例数据传输对象,用于返回分页查询的实例列表结果 - pub fn new() -> OpenPageDtoOpenInstanceDto { - OpenPageDtoOpenInstanceDto { + pub fn new() -> OpenInstancePageDto { + OpenInstancePageDto { page: None, size: None, total: None, - content: None, + instances: None, } } } diff --git a/rust/src/models/open_page_dto_open_item_dto.rs b/rust/src/models/open_item_page_dto.rs similarity index 87% rename from rust/src/models/open_page_dto_open_item_dto.rs rename to rust/src/models/open_item_page_dto.rs index 556e71d..cc0212f 100644 --- a/rust/src/models/open_page_dto_open_item_dto.rs +++ b/rust/src/models/open_item_page_dto.rs @@ -8,12 +8,12 @@ * Generated by: https://openapi-generator.tech */ -/// OpenPageDtoOpenItemDto : 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 +/// OpenItemPageDto : 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenPageDtoOpenItemDto { +pub struct OpenItemPageDto { /// 当前页码,从0开始计数 #[serde(rename = "page", skip_serializing_if = "Option::is_none")] pub page: Option, @@ -28,10 +28,10 @@ pub struct OpenPageDtoOpenItemDto { pub content: Option>, } -impl OpenPageDtoOpenItemDto { +impl OpenItemPageDto { /// 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - pub fn new() -> OpenPageDtoOpenItemDto { - OpenPageDtoOpenItemDto { + pub fn new() -> OpenItemPageDto { + OpenItemPageDto { page: None, size: None, total: None, diff --git a/rust/src/models/open_miss_env_dto.rs b/rust/src/models/open_miss_env_dto.rs new file mode 100644 index 0000000..fd5379c --- /dev/null +++ b/rust/src/models/open_miss_env_dto.rs @@ -0,0 +1,30 @@ +/* + * 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 OpenMissEnvDto { + /// 查询状态码 + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl OpenMissEnvDto { + pub fn new() -> OpenMissEnvDto { + OpenMissEnvDto { + code: None, + message: None, + } + } +} diff --git a/spring-boot2/.openapi-generator/FILES b/spring-boot2/.openapi-generator/FILES index f4da8b2..5c1c428 100644 --- a/spring-boot2/.openapi-generator/FILES +++ b/spring-boot2/.openapi-generator/FILES @@ -33,6 +33,7 @@ src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java src/main/java/com/apollo/openapi/server/config/HomeController.java src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java +src/main/java/com/apollo/openapi/server/model/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 @@ -47,17 +48,18 @@ src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +src/main/java/com/apollo/openapi/server/model/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/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/OpenNamespaceIdentifier.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncModel.java src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java -src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java -src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java src/main/java/com/apollo/openapi/server/model/OpenReleaseBO.java src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java src/main/java/com/apollo/openapi/server/model/RichResponseEntity.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 6a14757..c1a39a7 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java @@ -5,11 +5,12 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; -import com.apollo.openapi.server.model.MultiResponseEntity; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenAppDTO; import com.apollo.openapi.server.model.OpenCreateAppDTO; import com.apollo.openapi.server.model.OpenEnvClusterDTO; +import com.apollo.openapi.server.model.OpenEnvClusterInfo; +import com.apollo.openapi.server.model.OpenMissEnvDTO; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -57,13 +58,13 @@ default AppManagementApiDelegate getDelegate() { tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "应用创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -76,7 +77,7 @@ default AppManagementApiDelegate getDelegate() { produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity createApp( + default ResponseEntity createApp( @Parameter(name = "OpenCreateAppDTO", description = "", required = true) @Valid @RequestBody OpenCreateAppDTO openCreateAppDTO ) { return getDelegate().createApp(openCreateAppDTO); @@ -88,8 +89,8 @@ default ResponseEntity createApp( * POST /openapi/v1/apps/envs/{env} * * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (required) + * @param operator 操作人用户名 (optional) * @return 应用在指定环境创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -104,10 +105,10 @@ default ResponseEntity createApp( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -122,10 +123,10 @@ default ResponseEntity createApp( ) default ResponseEntity createAppInEnv( @Parameter(name = "env", description = "环境标识,例如 DEV、FAT、UAT、PROD", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, - @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO + @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().createAppInEnv(env, operator, openAppDTO); + return getDelegate().createAppInEnv(env, openAppDTO, operator); } @@ -134,7 +135,7 @@ default ResponseEntity createAppInEnv( * DELETE /openapi/v1/apps/{appId} * * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 应用删除成功 (status code 200) * or 权限不足,需要超级管理员权限 (status code 403) * or 应用不存在 (status code 404) @@ -149,10 +150,10 @@ default ResponseEntity createAppInEnv( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "403", description = "权限不足,需要超级管理员权限", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -166,7 +167,7 @@ default ResponseEntity createAppInEnv( ) default ResponseEntity deleteApp( @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @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().deleteApp(appId, operator); } @@ -190,7 +191,7 @@ default ResponseEntity deleteApp( @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) }), @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -226,7 +227,7 @@ default ResponseEntity> findApps( @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) }), @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -246,8 +247,8 @@ default ResponseEntity> findAppsAuthorized( /** - * GET /openapi/v1/apps/{appId}/miss_envs : 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs : 查找缺失的环境(new added) + * GET /openapi/v1/apps/{appId}/miss-envs * * @param appId 应用ID (required) * @return 成功获取应用缺失的环境列表 (status code 200) @@ -256,14 +257,14 @@ default ResponseEntity> findAppsAuthorized( @Operation( operationId = "findMissEnvs", summary = "查找缺失的环境(new added)", - description = "GET /openapi/v1/apps/{appId}/miss_envs", + description = "GET /openapi/v1/apps/{appId}/miss-envs", tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取应用缺失的环境列表", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = MultiResponseEntity.class)) + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenMissEnvDTO.class))) }), @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -272,10 +273,10 @@ default ResponseEntity> findAppsAuthorized( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/miss_envs", + value = "/openapi/v1/apps/{appId}/miss-envs", produces = { "application/json" } ) - default ResponseEntity findMissEnvs( + default ResponseEntity> findMissEnvs( @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { return getDelegate().findMissEnvs(appId); @@ -300,7 +301,7 @@ default ResponseEntity findMissEnvs( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) }), @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -320,20 +321,25 @@ default ResponseEntity getApp( /** - * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树(new added) - * GET /openapi/v1/apps/{appId}/navtree + * GET /openapi/v1/apps/by-self : 获取当前Consumer/User的应用列表(分页)(new added) + * GET /openapi/v1/apps/by-self * - * @param appId 应用ID (required) - * @return 成功获取应用导航树 (status code 200) + * @param page 页数 (required) + * @param size 页大小 (required) + * @return 成功获取Consumer的应用列表 (status code 200) + * or 未授权访问 (status code 401) */ @Operation( - operationId = "getAppNavTree", - summary = "获取应用导航树(new added)", - description = "GET /openapi/v1/apps/{appId}/navtree", + operationId = "getAppsBySelf", + summary = "获取当前Consumer/User的应用列表(分页)(new added)", + description = "GET /openapi/v1/apps/by-self", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取应用导航树", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = MultiResponseEntity.class)) + @ApiResponse(responseCode = "200", description = "成功获取Consumer的应用列表", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) + }), + @ApiResponse(responseCode = "401", description = "未授权访问", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -342,36 +348,32 @@ default ResponseEntity getApp( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/navtree", + value = "/openapi/v1/apps/by-self", produces = { "application/json" } ) - default ResponseEntity getAppNavTree( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId + default ResponseEntity> getAppsBySelf( + @NotNull @Min(0) @Parameter(name = "page", description = "页数", 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().getAppNavTree(appId); + return getDelegate().getAppsBySelf(page, size); } /** - * GET /openapi/v1/apps/by-self : 获取当前Consumer的应用列表(分页)(new added) - * GET /openapi/v1/apps/by-self + * GET /openapi/v1/apps/{appId}/env-cluster-info : 获取应用环境集群详情(new added) + * /openapi/v1/apps/{appId}/env-cluster-info * - * @param page 页数 (required) - * @param size 页大小 (required) - * @return 成功获取Consumer的应用列表 (status code 200) - * or 未授权访问 (status code 401) + * @param appId 应用ID (required) + * @return 成功获取应用环境集群详情 (status code 200) */ @Operation( - operationId = "getAppsBySelf", - summary = "获取当前Consumer的应用列表(分页)(new added)", - description = "GET /openapi/v1/apps/by-self", + operationId = "getEnvClusterInfo", + summary = "获取应用环境集群详情(new added)", + description = "/openapi/v1/apps/{appId}/env-cluster-info", tags = { "App Management" }, responses = { - @ApiResponse(responseCode = "200", description = "成功获取Consumer的应用列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) - }), - @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @ApiResponse(responseCode = "200", description = "成功获取应用环境集群详情", content = { + @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenEnvClusterInfo.class))) }) }, security = { @@ -380,36 +382,35 @@ default ResponseEntity getAppNavTree( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/apps/by-self", + value = "/openapi/v1/apps/{appId}/env-cluster-info", produces = { "application/json" } ) - default ResponseEntity> getAppsBySelf( - @NotNull @Min(0) @Parameter(name = "page", description = "页数", 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 + default ResponseEntity> getEnvClusterInfo( + @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().getAppsBySelf(page, size); + return getDelegate().getEnvClusterInfo(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) * or 应用不存在 (status code 404) */ @Operation( - operationId = "getEnvClusterInfo", + 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 = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenEnvClusterDTO.class))) }), @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -421,10 +422,10 @@ default ResponseEntity> getAppsBySelf( value = "/openapi/v1/apps/{appId}/envclusters", produces = { "application/json" } ) - default ResponseEntity> getEnvClusterInfo( + default ResponseEntity> getEnvClusters( @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId ) { - return getDelegate().getEnvClusterInfo(appId); + return getDelegate().getEnvClusters(appId); } @@ -433,8 +434,8 @@ default ResponseEntity> getEnvClusterInfo( * PUT /openapi/v1/apps/{appId} * * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (required) + * @param operator 操作人用户名 (optional) * @return 应用更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) @@ -446,13 +447,13 @@ default ResponseEntity> getEnvClusterInfo( tags = { "App Management" }, responses = { @ApiResponse(responseCode = "200", description = "应用更新成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppDTO.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -465,12 +466,12 @@ default ResponseEntity> getEnvClusterInfo( produces = { "application/json" }, consumes = { "application/json" } ) - default ResponseEntity updateApp( + default ResponseEntity updateApp( @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @NotNull @Parameter(name = "operator", description = "操作人用户名", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = true) String operator, - @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO + @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO, + @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator ) { - return getDelegate().updateApp(appId, operator, openAppDTO); + return getDelegate().updateApp(appId, openAppDTO, operator); } } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java index bbb4987..cd7ba6b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java @@ -1,10 +1,11 @@ package com.apollo.openapi.server.api; -import java.util.Map; -import com.apollo.openapi.server.model.MultiResponseEntity; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenAppDTO; import com.apollo.openapi.server.model.OpenCreateAppDTO; import com.apollo.openapi.server.model.OpenEnvClusterDTO; +import com.apollo.openapi.server.model.OpenEnvClusterInfo; +import com.apollo.openapi.server.model.OpenMissEnvDTO; import org.springframework.beans.factory.annotation.Autowired; 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 50d912f..58e88f6 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java @@ -1,10 +1,11 @@ package com.apollo.openapi.server.api; -import java.util.Map; -import com.apollo.openapi.server.model.MultiResponseEntity; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenAppDTO; import com.apollo.openapi.server.model.OpenCreateAppDTO; import com.apollo.openapi.server.model.OpenEnvClusterDTO; +import com.apollo.openapi.server.model.OpenEnvClusterInfo; +import com.apollo.openapi.server.model.OpenMissEnvDTO; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -37,7 +38,16 @@ default Optional getRequest() { * or 权限不足 (status code 403) * @see AppManagementApi#createApp */ - default ResponseEntity createApp(OpenCreateAppDTO openCreateAppDTO) { + default ResponseEntity createApp(OpenCreateAppDTO openCreateAppDTO) { + 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\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -47,16 +57,16 @@ default ResponseEntity createApp(OpenCreateAppDTO openCreateAppDTO) { * POST /openapi/v1/apps/envs/{env} * * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (required) + * @param operator 操作人用户名 (optional) * @return 应用在指定环境创建成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * @see AppManagementApi#createAppInEnv */ default ResponseEntity createAppInEnv(String env, - String operator, - OpenAppDTO openAppDTO) { + OpenAppDTO openAppDTO, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } @@ -66,7 +76,7 @@ default ResponseEntity createAppInEnv(String env, * DELETE /openapi/v1/apps/{appId} * * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) + * @param operator 操作人用户名 (optional) * @return 应用删除成功 (status code 200) * or 权限不足,需要超级管理员权限 (status code 403) * or 应用不存在 (status code 404) @@ -91,7 +101,7 @@ default ResponseEntity> findApps(String appIds) { 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\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -113,7 +123,7 @@ default ResponseEntity> findAppsAuthorized() { 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\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -124,19 +134,19 @@ default ResponseEntity> findAppsAuthorized() { } /** - * GET /openapi/v1/apps/{appId}/miss_envs : 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs : 查找缺失的环境(new added) + * GET /openapi/v1/apps/{appId}/miss-envs * * @param appId 应用ID (required) * @return 成功获取应用缺失的环境列表 (status code 200) * or 应用不存在 (status code 404) * @see AppManagementApi#findMissEnvs */ - default ResponseEntity findMissEnvs(String appId) { + default ResponseEntity> findMissEnvs(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 200, \"entities\" : [ { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" }, { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" } ] }"; + String exampleString = "[ { \"code\" : 0, \"message\" : \"message\" }, { \"code\" : 0, \"message\" : \"message\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -159,7 +169,7 @@ default ResponseEntity getApp(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\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -170,18 +180,21 @@ default ResponseEntity getApp(String appId) { } /** - * GET /openapi/v1/apps/{appId}/navtree : 获取应用导航树(new added) - * GET /openapi/v1/apps/{appId}/navtree + * GET /openapi/v1/apps/by-self : 获取当前Consumer/User的应用列表(分页)(new added) + * GET /openapi/v1/apps/by-self * - * @param appId 应用ID (required) - * @return 成功获取应用导航树 (status code 200) - * @see AppManagementApi#getAppNavTree + * @param page 页数 (required) + * @param size 页大小 (required) + * @return 成功获取Consumer的应用列表 (status code 200) + * or 未授权访问 (status code 401) + * @see AppManagementApi#getAppsBySelf */ - default ResponseEntity getAppNavTree(String appId) { + default ResponseEntity> getAppsBySelf(Integer page, + Integer size) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"code\" : 200, \"entities\" : [ { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" }, { \"code\" : 200, \"message\" : \"OK\", \"body\" : \"{}\" } ] }"; + String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -192,21 +205,18 @@ default ResponseEntity getAppNavTree(String appId) { } /** - * GET /openapi/v1/apps/by-self : 获取当前Consumer的应用列表(分页)(new added) - * GET /openapi/v1/apps/by-self + * GET /openapi/v1/apps/{appId}/env-cluster-info : 获取应用环境集群详情(new added) + * /openapi/v1/apps/{appId}/env-cluster-info * - * @param page 页数 (required) - * @param size 页大小 (required) - * @return 成功获取Consumer的应用列表 (status code 200) - * or 未授权访问 (status code 401) - * @see AppManagementApi#getAppsBySelf + * @param appId 应用ID (required) + * @return 成功获取应用环境集群详情 (status code 200) + * @see AppManagementApi#getEnvClusterInfo */ - default ResponseEntity> getAppsBySelf(Integer page, - Integer size) { + default ResponseEntity> getEnvClusterInfo(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\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" } ]"; + String exampleString = "[ { \"code\" : 0, \"message\" : \"message\", \"env\" : \"env\", \"clusters\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] }, { \"code\" : 0, \"message\" : \"message\", \"env\" : \"env\", \"clusters\" : [ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] } ]"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -218,14 +228,14 @@ default ResponseEntity> getAppsBySelf(Integer page, /** * 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) * or 应用不存在 (status code 404) - * @see AppManagementApi#getEnvClusterInfo + * @see AppManagementApi#getEnvClusters */ - default ResponseEntity> getEnvClusterInfo(String appId) { + default ResponseEntity> getEnvClusters(String appId) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { @@ -244,25 +254,16 @@ default ResponseEntity> getEnvClusterInfo(String appId) * PUT /openapi/v1/apps/{appId} * * @param appId 应用ID (required) - * @param operator 操作人用户名 (required) * @param openAppDTO (required) + * @param operator 操作人用户名 (optional) * @return 应用更新成功 (status code 200) * or 请求参数错误 (status code 400) * or 权限不足 (status code 403) * @see AppManagementApi#updateApp */ - default ResponseEntity updateApp(String appId, - String operator, - OpenAppDTO openAppDTO) { - 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\", \"orgName\" : \"orgName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); + default ResponseEntity updateApp(String appId, + OpenAppDTO openAppDTO, + String operator) { return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java index 9cce350..1f6e465 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java @@ -5,7 +5,7 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenClusterDTO; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; @@ -59,10 +59,10 @@ default ClusterManagementApiDelegate getDelegate() { @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -107,13 +107,13 @@ default ResponseEntity createCluster( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "删除失败,集群可能包含配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "404", description = "集群不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -155,7 +155,7 @@ default ResponseEntity deleteCluster( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterDTO.class)) }), @ApiResponse(responseCode = "404", description = "集群不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java index ba1f982..ceb349b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenClusterDTO; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java index 77927a8..ecda305 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenClusterDTO; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -42,7 +42,7 @@ default ResponseEntity createCluster(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\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -91,7 +91,7 @@ default ResponseEntity getCluster(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\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 6, \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; + String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java index d44577c..501a864 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java @@ -6,7 +6,7 @@ package com.apollo.openapi.server.api; import com.apollo.openapi.server.model.OpenInstanceDTO; -import com.apollo.openapi.server.model.OpenPageDTOOpenInstanceDTO; +import com.apollo.openapi.server.model.OpenInstancePageDTO; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -39,8 +39,51 @@ default InstanceManagementApiDelegate getDelegate() { } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-namespace : 根据namespaceName查询实例(new added) + * + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页数 (required) + * @param size 页大小 (required) + * @param instanceAppId Instance表中的AppID (optional) + * @return (status code 200) + */ + @Operation( + operationId = "getByNamespace", + summary = "根据namespaceName查询实例(new added)", + tags = { "Instance Management" }, + responses = { + @ApiResponse(responseCode = "200", description = "", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenInstancePageDTO.class)) + }) + }, + security = { + @SecurityRequirement(name = "ApiKeyAuth") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/openapi/v1/envs/{env}/instances/by-namespace", + produces = { "application/json" } + ) + default ResponseEntity getByNamespace( + @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, + @NotNull @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = true) String appId, + @NotNull @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "clusterName", required = true) String clusterName, + @NotNull @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "namespaceName", required = true) String namespaceName, + @NotNull @Min(0) @Parameter(name = "page", description = "页数", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true, defaultValue = "0") Integer page, + @NotNull @Min(0) @Parameter(name = "size", description = "页大小", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true, defaultValue = "0") Integer size, + @Parameter(name = "instanceAppId", description = "Instance表中的AppID", in = ParameterIn.QUERY) @Valid @RequestParam(value = "instanceAppId", required = false) String instanceAppId + ) { + return getDelegate().getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId); + } + + + /** + * GET /openapi/v1/envs/{env}/instances/by-release : 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/instances/by-release * * @param env (required) * @param releaseId (required) @@ -51,11 +94,11 @@ default InstanceManagementApiDelegate getDelegate() { @Operation( operationId = "getByRelease", summary = "根据发布版本查询实例(支持分页) (new added)", - description = "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances", + description = "GET /openapi/v1/envs/{env}/instances/by-release", tags = { "Instance Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenInstanceDTO.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenInstancePageDTO.class)) }) }, security = { @@ -64,12 +107,12 @@ default InstanceManagementApiDelegate getDelegate() { ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/releases/{releaseId}/instances", + value = "/openapi/v1/envs/{env}/instances/by-release", produces = { "application/json" } ) - default ResponseEntity getByRelease( + default ResponseEntity getByRelease( @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("releaseId") Integer releaseId, + @NotNull @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "releaseId", required = true) Long releaseId, @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size ) { @@ -78,20 +121,18 @@ default ResponseEntity getByRelease( /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + * GET /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in : 查询不在指定发布版本中的实例 (new added) * * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) + * @param releaseIds 排除的发布ID列表,用逗号分隔 (optional) * @return (status code 200) */ @Operation( - operationId = "getByReleasesNotIn", + operationId = "getByReleasesAndNamespaceNotIn", summary = "查询不在指定发布版本中的实例 (new added)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3", tags = { "Instance Management" }, responses = { @ApiResponse(responseCode = "200", description = "", content = { @@ -104,17 +145,17 @@ default ResponseEntity getByRelease( ) @RequestMapping( method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in", + value = "/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in", produces = { "application/json" } ) - default ResponseEntity> getByReleasesNotIn( + default ResponseEntity> getByReleasesAndNamespaceNotIn( @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "excludeReleases", description = "排除的发布ID列表,用逗号分隔", in = ParameterIn.QUERY) @Valid @RequestParam(value = "excludeReleases", required = false) String excludeReleases + @NotNull @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = true) String appId, + @NotNull @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "clusterName", required = true) String clusterName, + @NotNull @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "namespaceName", required = true) String namespaceName, + @Parameter(name = "releaseIds", description = "排除的发布ID列表,用逗号分隔", in = ParameterIn.QUERY) @Valid @RequestParam(value = "releaseIds", required = false) String releaseIds ) { - return getDelegate().getByReleasesNotIn(env, appId, clusterName, namespaceName, excludeReleases); + return getDelegate().getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java index 48feaef..92141e0 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java @@ -1,7 +1,7 @@ package com.apollo.openapi.server.api; import com.apollo.openapi.server.model.OpenInstanceDTO; -import com.apollo.openapi.server.model.OpenPageDTOOpenInstanceDTO; +import com.apollo.openapi.server.model.OpenInstancePageDTO; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java index ebb3ca9..15013c9 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java @@ -1,7 +1,7 @@ package com.apollo.openapi.server.api; import com.apollo.openapi.server.model.OpenInstanceDTO; -import com.apollo.openapi.server.model.OpenPageDTOOpenInstanceDTO; +import com.apollo.openapi.server.model.OpenInstancePageDTO; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -25,8 +25,41 @@ default Optional getRequest() { } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances : 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-namespace : 根据namespaceName查询实例(new added) + * + * @param env 环境标识 (required) + * @param appId 应用ID (required) + * @param clusterName 集群名称 (required) + * @param namespaceName 命名空间名称 (required) + * @param page 页数 (required) + * @param size 页大小 (required) + * @param instanceAppId Instance表中的AppID (optional) + * @return (status code 200) + * @see InstanceManagementApi#getByNamespace + */ + default ResponseEntity getByNamespace(String env, + String appId, + String clusterName, + String namespaceName, + Integer page, + Integer size, + String instanceAppId) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"instances\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ], \"page\" : 0 }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + /** + * GET /openapi/v1/envs/{env}/instances/by-release : 根据发布版本查询实例(支持分页) (new added) + * GET /openapi/v1/envs/{env}/instances/by-release * * @param env (required) * @param releaseId (required) @@ -35,14 +68,14 @@ default Optional getRequest() { * @return (status code 200) * @see InstanceManagementApi#getByRelease */ - default ResponseEntity getByRelease(String env, - Integer releaseId, + default ResponseEntity getByRelease(String env, + Long releaseId, Integer page, Integer size) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ] }"; + String exampleString = "{ \"total\" : 1, \"size\" : 6, \"instances\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 }, { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"configurations\" : { \"key\" : \"configurations\" }, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ], \"page\" : 0 }"; ApiUtil.setExampleResponse(request, "application/json", exampleString); break; } @@ -53,22 +86,21 @@ default ResponseEntity getByRelease(String env, } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in : 查询不在指定发布版本中的实例 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 + * GET /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in : 查询不在指定发布版本中的实例 (new added) * * @param env 环境标识 (required) * @param appId 应用ID (required) * @param clusterName 集群名称 (required) * @param namespaceName 命名空间名称 (required) - * @param excludeReleases 排除的发布ID列表,用逗号分隔 (optional) + * @param releaseIds 排除的发布ID列表,用逗号分隔 (optional) * @return (status code 200) - * @see InstanceManagementApi#getByReleasesNotIn + * @see InstanceManagementApi#getByReleasesAndNamespaceNotIn */ - default ResponseEntity> getByReleasesNotIn(String env, + default ResponseEntity> getByReleasesAndNamespaceNotIn(String env, String appId, String clusterName, String namespaceName, - String excludeReleases) { + String releaseIds) { getRequest().ifPresent(request -> { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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 f430445..a3852c1 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java @@ -5,12 +5,12 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; +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.OpenItemPageDTO; import com.apollo.openapi.server.model.OpenNamespaceSyncModel; import com.apollo.openapi.server.model.OpenNamespaceTextModel; -import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -65,7 +65,7 @@ default ItemManagementApiDelegate getDelegate() { @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -156,10 +156,10 @@ default ResponseEntity> compareItems( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -290,10 +290,10 @@ default ResponseEntity deleteItemByEncodedKey( tags = { "Item Management" }, responses = { @ApiResponse(responseCode = "200", description = "成功获取配置项列表", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPageDTOOpenItemDTO.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemPageDTO.class)) }), @ApiResponse(responseCode = "404", description = "命名空间不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -305,7 +305,7 @@ default ResponseEntity deleteItemByEncodedKey( value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", produces = { "application/json" } ) - default ResponseEntity findItemsByNamespace( + 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, @@ -339,7 +339,7 @@ default ResponseEntity findItemsByNamespace( @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) }), @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -384,7 +384,7 @@ default ResponseEntity> getBranchItems( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) }), @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -429,7 +429,7 @@ default ResponseEntity getItem( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) }), @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -475,10 +475,10 @@ default ResponseEntity getItemByEncodedKey( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -525,10 +525,10 @@ default ResponseEntity revertItems( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -579,13 +579,13 @@ default ResponseEntity syncItems( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -637,13 +637,13 @@ default ResponseEntity updateItem( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -691,7 +691,7 @@ default ResponseEntity updateItemByEncodedKey( @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) }), @ApiResponse(responseCode = "400", description = "配置文本语法错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { 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 c4e9afd..6c87c03 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java @@ -1,11 +1,11 @@ package com.apollo.openapi.server.api; -import java.util.Map; +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.OpenItemPageDTO; import com.apollo.openapi.server.model.OpenNamespaceSyncModel; import com.apollo.openapi.server.model.OpenNamespaceTextModel; -import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; import org.springframework.beans.factory.annotation.Autowired; 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 867c8cb..ab298b5 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java @@ -1,11 +1,11 @@ package com.apollo.openapi.server.api; -import java.util.Map; +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.OpenItemPageDTO; import com.apollo.openapi.server.model.OpenNamespaceSyncModel; import com.apollo.openapi.server.model.OpenNamespaceTextModel; -import com.apollo.openapi.server.model.OpenPageDTOOpenItemDTO; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -176,7 +176,7 @@ default ResponseEntity deleteItemByEncodedKey(String appId, * or 命名空间不存在 (status code 404) * @see ItemManagementApi#findItemsByNamespace */ - default ResponseEntity findItemsByNamespace(String appId, + default ResponseEntity findItemsByNamespace(String appId, String env, String clusterName, String namespaceName, 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 953c46a..203fa96 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 @@ -5,7 +5,7 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; @@ -146,7 +146,7 @@ default ResponseEntity deleteBranch( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) }), @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java index 6da4580..59061e5 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; 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 8034d13..46360ac 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 @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; import com.apollo.openapi.server.model.OpenNamespaceDTO; 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 af0addb..9cff7d2 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,7 +5,7 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; +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.OpenNamespaceLockDTO; @@ -97,10 +97,10 @@ default ResponseEntity> checkNamespaceIntegrity( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) }), @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { 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 581c854..0eb3cb9 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,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +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.OpenNamespaceLockDTO; 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 9a07f77..75ba776 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,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +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.OpenNamespaceLockDTO; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java index 3581f4a..8aba9a3 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java @@ -5,7 +5,7 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenOrganizationDto; import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.Operation; @@ -55,7 +55,7 @@ default OrganizationManagementApiDelegate getDelegate() { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenOrganizationDto.class))) }), @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java index 3f1f2cb..6095d47 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenOrganizationDto; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java index 1374e10..c668b85 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.OpenOrganizationDto; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; 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 d21dabf..4effee3 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java @@ -5,7 +5,7 @@ */ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenReleaseBO; @@ -152,10 +152,10 @@ default ResponseEntity createGrayRelease( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }), @ApiResponse(responseCode = "400", description = "发布参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -321,7 +321,7 @@ default ResponseEntity getReleaseById( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }), @ApiResponse(responseCode = "404", description = "未找到活跃发布", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { @@ -368,10 +368,10 @@ default ResponseEntity loadLatestActiveRelease( @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) }), @ApiResponse(responseCode = "400", description = "合并参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }), @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) + @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) }) }, security = { diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java index ced13c5..0a666ff 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenReleaseBO; 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 2382416..cd365bf 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java @@ -1,6 +1,6 @@ package com.apollo.openapi.server.api; -import java.util.Map; +import com.apollo.openapi.server.model.ExceptionResponse; import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; import com.apollo.openapi.server.model.NamespaceReleaseDTO; import com.apollo.openapi.server.model.OpenReleaseBO; diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java new file mode 100644 index 0000000..65406f6 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java @@ -0,0 +1,157 @@ +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 java.time.OffsetDateTime; +import org.springframework.format.annotation.DateTimeFormat; +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; + +/** + * ExceptionResponse + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class ExceptionResponse { + + private Integer status; + + private String message; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timestamp; + + private String exception; + + public ExceptionResponse status(Integer status) { + this.status = status; + return this; + } + + /** + * HTTP 状态码 + * @return status + */ + + @Schema(name = "status", description = "HTTP 状态码", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("status") + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public ExceptionResponse 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 ExceptionResponse timestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * 时间戳 + * @return timestamp + */ + @Valid + @Schema(name = "timestamp", description = "时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timestamp") + public OffsetDateTime getTimestamp() { + return timestamp; + } + + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + public ExceptionResponse exception(String exception) { + this.exception = exception; + return this; + } + + /** + * 错误类名 + * @return exception + */ + + @Schema(name = "exception", description = "错误类名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("exception") + public String getException() { + return exception; + } + + public void setException(String exception) { + this.exception = exception; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExceptionResponse exceptionResponse = (ExceptionResponse) o; + return Objects.equals(this.status, exceptionResponse.status) && + Objects.equals(this.message, exceptionResponse.message) && + Objects.equals(this.timestamp, exceptionResponse.timestamp) && + Objects.equals(this.exception, exceptionResponse.exception); + } + + @Override + public int hashCode() { + return Objects.hash(status, message, timestamp, exception); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExceptionResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); + sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java index f4d5e69..4921601 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java @@ -42,6 +42,8 @@ public class OpenAppDTO { private String ownerEmail; + private String ownerDisplayName; + public OpenAppDTO dataChangeCreatedBy(String dataChangeCreatedBy) { this.dataChangeCreatedBy = dataChangeCreatedBy; return this; @@ -242,6 +244,26 @@ public void setOwnerEmail(String ownerEmail) { this.ownerEmail = ownerEmail; } + public OpenAppDTO ownerDisplayName(String ownerDisplayName) { + this.ownerDisplayName = ownerDisplayName; + return this; + } + + /** + * Get ownerDisplayName + * @return ownerDisplayName + */ + + @Schema(name = "ownerDisplayName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("ownerDisplayName") + public String getOwnerDisplayName() { + return ownerDisplayName; + } + + public void setOwnerDisplayName(String ownerDisplayName) { + this.ownerDisplayName = ownerDisplayName; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -260,12 +282,13 @@ public boolean equals(Object o) { Objects.equals(this.orgId, openAppDTO.orgId) && Objects.equals(this.orgName, openAppDTO.orgName) && Objects.equals(this.ownerName, openAppDTO.ownerName) && - Objects.equals(this.ownerEmail, openAppDTO.ownerEmail); + Objects.equals(this.ownerEmail, openAppDTO.ownerEmail) && + Objects.equals(this.ownerDisplayName, openAppDTO.ownerDisplayName); } @Override public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail); + return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail, ownerDisplayName); } @Override @@ -282,6 +305,7 @@ public String toString() { sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); sb.append(" ownerEmail: ").append(toIndentedString(ownerEmail)).append("\n"); + sb.append(" ownerDisplayName: ").append(toIndentedString(ownerDisplayName)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java index 977cc2b..5c6934f 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java @@ -5,8 +5,9 @@ import com.apollo.openapi.server.model.OpenAppDTO; 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; @@ -28,7 +29,7 @@ public class OpenCreateAppDTO { private Boolean assignAppRoleToSelf; @Valid - private List admins; + private Set admins; private OpenAppDTO app; @@ -52,14 +53,14 @@ public void setAssignAppRoleToSelf(Boolean assignAppRoleToSelf) { this.assignAppRoleToSelf = assignAppRoleToSelf; } - public OpenCreateAppDTO admins(List admins) { + public OpenCreateAppDTO admins(Set admins) { this.admins = admins; return this; } public OpenCreateAppDTO addAdminsItem(String adminsItem) { if (this.admins == null) { - this.admins = new ArrayList<>(); + this.admins = new LinkedHashSet<>(); } this.admins.add(adminsItem); return this; @@ -72,11 +73,12 @@ public OpenCreateAppDTO addAdminsItem(String adminsItem) { @Schema(name = "admins", description = "应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @JsonProperty("admins") - public List getAdmins() { + public Set getAdmins() { return admins; } - public void setAdmins(List admins) { + @JsonDeserialize(as = LinkedHashSet.class) + public void setAdmins(Set admins) { this.admins = admins; } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java index 9a9a085..ed5137f 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java @@ -24,11 +24,55 @@ @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class OpenEnvClusterInfo { + private Integer code; + + private String message; + private String env; @Valid private List<@Valid OpenClusterDTO> clusters; + public OpenEnvClusterInfo 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 OpenEnvClusterInfo 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 OpenEnvClusterInfo env(String env) { this.env = env; return this; @@ -86,19 +130,23 @@ public boolean equals(Object o) { return false; } OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; - return Objects.equals(this.env, openEnvClusterInfo.env) && + return Objects.equals(this.code, openEnvClusterInfo.code) && + Objects.equals(this.message, openEnvClusterInfo.message) && + Objects.equals(this.env, openEnvClusterInfo.env) && Objects.equals(this.clusters, openEnvClusterInfo.clusters); } @Override public int hashCode() { - return Objects.hash(env, clusters); + return Objects.hash(code, message, env, clusters); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OpenEnvClusterInfo {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); sb.append(" env: ").append(toIndentedString(env)).append("\n"); sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); sb.append("}"); diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java similarity index 64% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java index 9acb9b4..7e2653a 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenInstanceDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java @@ -21,9 +21,9 @@ * 分页实例数据传输对象,用于返回分页查询的实例列表结果 */ -@Schema(name = "OpenPageDTOOpenInstanceDTO", description = "分页实例数据传输对象,用于返回分页查询的实例列表结果") +@Schema(name = "OpenInstancePageDTO", description = "分页实例数据传输对象,用于返回分页查询的实例列表结果") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenPageDTOOpenInstanceDTO { +public class OpenInstancePageDTO { private Integer page; @@ -32,9 +32,9 @@ public class OpenPageDTOOpenInstanceDTO { private Long total; @Valid - private List<@Valid OpenInstanceDTO> content; + private List<@Valid OpenInstanceDTO> instances; - public OpenPageDTOOpenInstanceDTO page(Integer page) { + public OpenInstancePageDTO page(Integer page) { this.page = page; return this; } @@ -54,7 +54,7 @@ public void setPage(Integer page) { this.page = page; } - public OpenPageDTOOpenInstanceDTO size(Integer size) { + public OpenInstancePageDTO size(Integer size) { this.size = size; return this; } @@ -74,7 +74,7 @@ public void setSize(Integer size) { this.size = size; } - public OpenPageDTOOpenInstanceDTO total(Long total) { + public OpenInstancePageDTO total(Long total) { this.total = total; return this; } @@ -94,32 +94,32 @@ public void setTotal(Long total) { this.total = total; } - public OpenPageDTOOpenInstanceDTO content(List<@Valid OpenInstanceDTO> content) { - this.content = content; + public OpenInstancePageDTO instances(List<@Valid OpenInstanceDTO> instances) { + this.instances = instances; return this; } - public OpenPageDTOOpenInstanceDTO addContentItem(OpenInstanceDTO contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); + public OpenInstancePageDTO addInstancesItem(OpenInstanceDTO instancesItem) { + if (this.instances == null) { + this.instances = new ArrayList<>(); } - this.content.add(contentItem); + this.instances.add(instancesItem); return this; } /** * 当前页的实例列表,包含具体的实例数据 - * @return content + * @return instances */ @Valid - @Schema(name = "content", description = "当前页的实例列表,包含具体的实例数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("content") - public List<@Valid OpenInstanceDTO> getContent() { - return content; + @Schema(name = "instances", description = "当前页的实例列表,包含具体的实例数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("instances") + public List<@Valid OpenInstanceDTO> getInstances() { + return instances; } - public void setContent(List<@Valid OpenInstanceDTO> content) { - this.content = content; + public void setInstances(List<@Valid OpenInstanceDTO> instances) { + this.instances = instances; } @Override @@ -130,26 +130,26 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenPageDTOOpenInstanceDTO openPageDTOOpenInstanceDTO = (OpenPageDTOOpenInstanceDTO) o; - return Objects.equals(this.page, openPageDTOOpenInstanceDTO.page) && - Objects.equals(this.size, openPageDTOOpenInstanceDTO.size) && - Objects.equals(this.total, openPageDTOOpenInstanceDTO.total) && - Objects.equals(this.content, openPageDTOOpenInstanceDTO.content); + OpenInstancePageDTO openInstancePageDTO = (OpenInstancePageDTO) o; + return Objects.equals(this.page, openInstancePageDTO.page) && + Objects.equals(this.size, openInstancePageDTO.size) && + Objects.equals(this.total, openInstancePageDTO.total) && + Objects.equals(this.instances, openInstancePageDTO.instances); } @Override public int hashCode() { - return Objects.hash(page, size, total, content); + return Objects.hash(page, size, total, instances); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenPageDTOOpenInstanceDTO {\n"); + sb.append("class OpenInstancePageDTO {\n"); sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" instances: ").append(toIndentedString(instances)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java similarity index 80% rename from spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java rename to spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java index 42a3d84..554791b 100644 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPageDTOOpenItemDTO.java +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java @@ -21,9 +21,9 @@ * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 */ -@Schema(name = "OpenPageDTOOpenItemDTO", description = "分页配置项数据传输对象,用于返回分页查询的配置项列表结果") +@Schema(name = "OpenItemPageDTO", description = "分页配置项数据传输对象,用于返回分页查询的配置项列表结果") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenPageDTOOpenItemDTO { +public class OpenItemPageDTO { private Integer page; @@ -34,7 +34,7 @@ public class OpenPageDTOOpenItemDTO { @Valid private List<@Valid OpenItemDTO> content; - public OpenPageDTOOpenItemDTO page(Integer page) { + public OpenItemPageDTO page(Integer page) { this.page = page; return this; } @@ -54,7 +54,7 @@ public void setPage(Integer page) { this.page = page; } - public OpenPageDTOOpenItemDTO size(Integer size) { + public OpenItemPageDTO size(Integer size) { this.size = size; return this; } @@ -74,7 +74,7 @@ public void setSize(Integer size) { this.size = size; } - public OpenPageDTOOpenItemDTO total(Long total) { + public OpenItemPageDTO total(Long total) { this.total = total; return this; } @@ -94,12 +94,12 @@ public void setTotal(Long total) { this.total = total; } - public OpenPageDTOOpenItemDTO content(List<@Valid OpenItemDTO> content) { + public OpenItemPageDTO content(List<@Valid OpenItemDTO> content) { this.content = content; return this; } - public OpenPageDTOOpenItemDTO addContentItem(OpenItemDTO contentItem) { + public OpenItemPageDTO addContentItem(OpenItemDTO contentItem) { if (this.content == null) { this.content = new ArrayList<>(); } @@ -130,11 +130,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - OpenPageDTOOpenItemDTO openPageDTOOpenItemDTO = (OpenPageDTOOpenItemDTO) o; - return Objects.equals(this.page, openPageDTOOpenItemDTO.page) && - Objects.equals(this.size, openPageDTOOpenItemDTO.size) && - Objects.equals(this.total, openPageDTOOpenItemDTO.total) && - Objects.equals(this.content, openPageDTOOpenItemDTO.content); + OpenItemPageDTO openItemPageDTO = (OpenItemPageDTO) o; + return Objects.equals(this.page, openItemPageDTO.page) && + Objects.equals(this.size, openItemPageDTO.size) && + Objects.equals(this.total, openItemPageDTO.total) && + Objects.equals(this.content, openItemPageDTO.content); } @Override @@ -145,7 +145,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class OpenPageDTOOpenItemDTO {\n"); + sb.append("class OpenItemPageDTO {\n"); sb.append(" page: ").append(toIndentedString(page)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" total: ").append(toIndentedString(total)).append("\n"); diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java new file mode 100644 index 0000000..d999c26 --- /dev/null +++ b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java @@ -0,0 +1,106 @@ +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; + +/** + * OpenMissEnvDTO + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") +public class OpenMissEnvDTO { + + private Integer code; + + private String message; + + public OpenMissEnvDTO 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 OpenMissEnvDTO message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + + @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("message") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OpenMissEnvDTO openMissEnvDTO = (OpenMissEnvDTO) o; + return Objects.equals(this.code, openMissEnvDTO.code) && + Objects.equals(this.message, openMissEnvDTO.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OpenMissEnvDTO {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/spring-boot2/src/main/resources/openapi.yaml b/spring-boot2/src/main/resources/openapi.yaml index 1b38540..9e3bc0e 100644 --- a/spring-boot2/src/main/resources/openapi.yaml +++ b/spring-boot2/src/main/resources/openapi.yaml @@ -91,9 +91,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 summary: 查找应用 (original openapi) tags: @@ -116,23 +114,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SuccessEmptyResponse' + $ref: '#/components/schemas/OpenAppDTO' description: 应用创建成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建应用 (original openapi) tags: @@ -180,9 +174,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 summary: 获取当前Consumer授权的应用列表 (original openapi) tags: @@ -193,8 +185,8 @@ paths: /openapi/v1/apps/{appId}/envclusters: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/envclusters" - operationId: getEnvClusterInfo + description: "GET /openapi/v1/apps/{appId}/envClusters" + operationId: getEnvClusters parameters: - description: 应用ID explode: false @@ -229,9 +221,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 获取应用的环境集群信息 (original openapi) tags: @@ -257,7 +247,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -266,25 +256,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 应用删除成功 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足,需要超级管理员权限 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 删除应用(new added) tags: @@ -327,9 +311,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 获取单个应用信息(new added) tags: @@ -354,7 +336,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -368,35 +350,20 @@ paths: "200": content: application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T16:45:00.000Z - name: Updated Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com schema: - $ref: '#/components/schemas/OpenAppDTO' + $ref: '#/components/schemas/SuccessEmptyResponse' description: 应用更新成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 更新应用(new added) tags: @@ -463,21 +430,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 - summary: 获取当前Consumer的应用列表(分页)(new added) + summary: 获取当前Consumer/User的应用列表(分页)(new added) tags: - App Management x-accepts: application/json x-tags: - tag: App Management - /openapi/v1/apps/{appId}/navtree: + /openapi/v1/apps/{appId}/env-cluster-info: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/navtree" - operationId: getAppNavTree + description: "/openapi/v1/apps/{appId}/env-cluster-info" + operationId: getEnvClusterInfo parameters: - description: 应用ID explode: false @@ -493,6 +458,7 @@ paths: application/json: example: - env: DEV + code: "200" clusters: - dataChangeCreatedBy: apollo dataChangeLastModifiedBy: apollo @@ -505,10 +471,13 @@ paths: appId: sample-app parentClusterId: 0 comment: Default cluster + message: "load env: DEV cluster error" schema: - $ref: '#/components/schemas/MultiResponseEntity' - description: 成功获取应用导航树 - summary: 获取应用导航树(new added) + items: + $ref: '#/components/schemas/OpenEnvClusterInfo' + type: array + description: 成功获取应用环境集群详情 + summary: 获取应用环境集群详情(new added) tags: - App Management x-accepts: application/json @@ -532,7 +501,7 @@ paths: explode: true in: query name: operator - required: true + required: false schema: type: string style: form @@ -547,25 +516,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 应用在指定环境创建成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 在指定环境创建应用(new added) tags: @@ -574,10 +537,10 @@ paths: x-accepts: application/json x-tags: - tag: App Management - /openapi/v1/apps/{appId}/miss_envs: + /openapi/v1/apps/{appId}/miss-envs: get: deprecated: false - description: "GET /openapi/v1/apps/{appId}/miss_envs" + description: "GET /openapi/v1/apps/{appId}/miss-envs" operationId: findMissEnvs parameters: - description: 应用ID @@ -592,16 +555,22 @@ paths: "200": content: application/json: + example: + - code: "200" + message: test_NOT_FOUND + - code: "500" + message: load appId:xx from env test_INTERNAL_ERROR error. test ERROR + MESSAGE schema: - $ref: '#/components/schemas/MultiResponseEntity' + items: + $ref: '#/components/schemas/OpenMissEnvDTO' + type: array description: 成功获取应用缺失的环境列表 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 应用不存在 summary: 查找缺失的环境(new added) tags: @@ -668,9 +637,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项删除成功 summary: 删除配置项 (original openapi) tags: @@ -743,9 +710,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 获取单个配置项 (original openapi) tags: @@ -819,33 +784,25 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 更新配置项 (original openapi) tags: @@ -946,15 +903,13 @@ paths: value: INFO comment: 日志级别配置 schema: - $ref: '#/components/schemas/OpenPageDTOOpenItemDTO' + $ref: '#/components/schemas/OpenItemPageDTO' description: 成功获取配置项列表 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 命名空间不存在 summary: 获取命名空间下的配置项列表 (original openapi) tags: @@ -1033,17 +988,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建新的配置项 (original openapi) tags: @@ -1111,9 +1062,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: "" summary: 通过编码的key删除配置项 (original openapi) tags: @@ -1186,9 +1135,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 通过查询参数获取配置项(支持编码的key) (original openapi) tags: @@ -1262,33 +1209,25 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更新成功(编码key) "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置项不存在 summary: 通过编码的key更新配置项 (original openapi) tags: @@ -1354,17 +1293,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 批量更新配置项成功 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 通过文本批量修改配置项 (new added) tags: @@ -1449,9 +1384,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 分支不存在 summary: 获取分支下的配置项 (new added) tags: @@ -1632,25 +1565,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项同步成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 同步配置项到多个命名空间 (new added) tags: @@ -1708,17 +1635,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置文本语法验证通过 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 配置文本语法错误 summary: 验证配置文本语法 (new added) tags: @@ -1778,25 +1701,19 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 配置项更改撤销成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 撤销配置项更改 (new added) tags: @@ -1847,33 +1764,25 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 集群删除成功 "400": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 删除失败,集群可能包含配置 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 "404": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 集群不存在 summary: 删除集群 (new added) tags: @@ -1928,9 +1837,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 集群不存在 summary: 获取指定集群信息 (original openapi) tags: @@ -1983,17 +1890,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建集群 (original openapi) tags: @@ -2072,17 +1975,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 发布参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建发布 (original openapi) tags: @@ -2156,9 +2055,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未找到活跃发布 summary: 获取最新活跃发布 (original openapi) tags: @@ -2254,17 +2151,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 合并参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 合并分支 (original openapi) tags: @@ -2469,9 +2362,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 发布回滚成功 summary: 回滚发布 (original openapi) tags: @@ -2754,10 +2645,10 @@ paths: x-accepts: application/json x-tags: - tag: Instance Management - /openapi/v1/envs/{env}/releases/{releaseId}/instances: + /openapi/v1/envs/{env}/instances/by-release: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/releases/{releaseId}/instances" + description: "GET /openapi/v1/envs/{env}/instances/by-release" operationId: getByRelease parameters: - description: "" @@ -2769,13 +2660,14 @@ paths: type: string style: simple - description: "" - explode: false - in: path + explode: true + in: query name: releaseId required: true schema: + format: int64 type: integer - style: simple + style: form - description: "" example: 0 explode: true @@ -2802,7 +2694,7 @@ paths: page: 0 size: 0 total: 0 - content: + instances: - id: 0 appId: "" clusterName: "" @@ -2827,7 +2719,7 @@ paths: dataChangeLastModifiedTime: "" dataChangeCreatedTime: "" schema: - $ref: '#/components/schemas/OpenPageDTOOpenInstanceDTO' + $ref: '#/components/schemas/OpenInstancePageDTO' description: "" summary: 根据发布版本查询实例(支持分页) (new added) tags: @@ -2835,11 +2727,10 @@ paths: x-accepts: application/json x-tags: - tag: Instance Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: + /openapi/v1/envs/{env}/instances/by-namespace: get: deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3" - operationId: getByReleasesNotIn + operationId: getByNamespace parameters: - description: 环境标识 explode: false @@ -2850,33 +2741,139 @@ paths: type: string style: simple - description: 应用ID - explode: false - in: path + explode: true + in: query name: appId required: true schema: type: string - style: simple + style: form - description: 集群名称 - explode: false - in: path + explode: true + in: query name: clusterName required: true schema: type: string - style: simple + style: form - description: 命名空间名称 + explode: true + in: query + name: namespaceName + required: true + schema: + type: string + style: form + - description: Instance表中的AppID + explode: true + in: query + name: instanceAppId + required: false + schema: + type: string + style: form + - description: 页数 + explode: true + in: query + name: page + required: true + schema: + default: 0 + minimum: 0 + type: integer + style: form + - description: 页大小 + explode: true + in: query + name: size + required: true + schema: + default: 0 + minimum: 0 + type: integer + style: form + responses: + "200": + content: + application/json: + example: + page: 0 + size: 0 + total: 0 + instances: + - id: 0 + appId: "" + clusterName: "" + dataCenter: "" + ip: "" + configs: + - release: + dataChangeCreatedBy: "" + dataChangeLastModifiedBy: "" + dataChangeCreatedTime: "" + dataChangeLastModifiedTime: "" + id: 0 + appId: "" + clusterName: "" + namespaceName: "" + name: "" + configurations: + ? "" + : "" + comment: "" + releaseDeliveryTime: "" + dataChangeLastModifiedTime: "" + dataChangeCreatedTime: "" + schema: + $ref: '#/components/schemas/OpenInstancePageDTO' + description: "" + summary: 根据namespaceName查询实例(new added) + tags: + - Instance Management + x-accepts: application/json + x-tags: + - tag: Instance Management + /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in: + get: + deprecated: false + operationId: getByReleasesAndNamespaceNotIn + parameters: + - description: 环境标识 explode: false in: path - name: namespaceName + name: env required: true schema: type: string style: simple + - description: 应用ID + explode: true + in: query + name: appId + required: true + schema: + type: string + style: form + - description: 集群名称 + explode: true + in: query + name: clusterName + required: true + schema: + type: string + style: form + - description: 命名空间名称 + explode: true + in: query + name: namespaceName + required: true + schema: + type: string + style: form - description: 排除的发布ID列表,用逗号分隔 explode: true in: query - name: excludeReleases + name: releaseIds required: false schema: type: string @@ -3001,17 +2998,13 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 请求参数错误 "403": content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 权限不足 summary: 创建AppNamespace (original openapi) tags: @@ -3307,9 +3300,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: AppNamespace删除成功 summary: 删除AppNamespace (new added) tags: @@ -3633,9 +3624,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 解除关联成功 summary: 删除关联的Namespace (new added) tags: @@ -3669,9 +3658,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 未授权访问 summary: 获取所有组织信息 (original openapi) tags: @@ -3756,9 +3743,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ExceptionResponse' - type: object + $ref: '#/components/schemas/ExceptionResponse' description: 分支不存在 summary: 获取命名空间分支信息 (original openapi) tags: @@ -3903,9 +3888,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 分支删除成功 summary: 删除命名空间分支 (original openapi) tags: @@ -4150,9 +4133,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/SuccessEmptyResponse' - type: object + $ref: '#/components/schemas/SuccessEmptyResponse' description: 灰度规则更新成功 summary: 更新分支灰度发布规则 (original openapi) tags: @@ -4195,6 +4176,7 @@ components: orgName: orgName dataChangeLastModifiedBy: dataChangeLastModifiedBy ownerName: ownerName + ownerDisplayName: ownerDisplayName appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name @@ -4234,6 +4216,8 @@ components: ownerEmail: description: 应用负责人邮箱地址,用于接收应用相关通知 type: string + ownerDisplayName: + type: string type: object OpenCreateAppDTO: description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 @@ -4243,6 +4227,7 @@ components: orgName: orgName dataChangeLastModifiedBy: dataChangeLastModifiedBy ownerName: ownerName + ownerDisplayName: ownerDisplayName appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name @@ -4262,6 +4247,7 @@ components: items: type: string type: array + uniqueItems: true app: $ref: '#/components/schemas/OpenAppDTO' type: object @@ -4304,7 +4290,7 @@ components: description: 配置项的注释说明,用于描述配置项的用途和含义 type: string type: object - OpenPageDTOOpenItemDTO: + OpenItemPageDTO: description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 example: total: 1 @@ -4352,9 +4338,9 @@ components: appId: appId dataChangeCreatedBy: dataChangeCreatedBy name: name - parentClusterId: 6 + parentClusterId: 1 comment: comment - id: 0 + id: 6 dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: dataChangeCreatedBy: @@ -4715,13 +4701,12 @@ components: description: 锁定者用户名 type: string type: object - OpenPageDTOOpenInstanceDTO: + OpenInstancePageDTO: description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 example: total: 1 size: 6 - page: 0 - content: + instances: - configs: - releaseDeliveryTime: 2025-09-29T12:34:56Z release: @@ -4796,6 +4781,7 @@ components: clusterName: clusterName ip: ip id: 5 + page: 0 properties: page: description: 当前页码,从0开始计数 @@ -4807,7 +4793,7 @@ components: description: 总记录数,符合查询条件的实例总数量 format: int64 type: integer - content: + instances: description: 当前页的实例列表,包含具体的实例数据 items: $ref: '#/components/schemas/OpenInstanceDTO' @@ -4830,7 +4816,36 @@ components: type: array type: object OpenEnvClusterInfo: + example: + code: 0 + message: message + env: env + clusters: + - dataChangeCreatedTime: 2025-09-29T12:34:56Z + dataChangeLastModifiedBy: dataChangeLastModifiedBy + appId: appId + dataChangeCreatedBy: dataChangeCreatedBy + name: name + parentClusterId: 1 + comment: comment + id: 6 + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z + - dataChangeCreatedTime: 2025-09-29T12:34:56Z + dataChangeLastModifiedBy: dataChangeLastModifiedBy + appId: appId + dataChangeCreatedBy: dataChangeCreatedBy + name: name + parentClusterId: 1 + comment: comment + id: 6 + dataChangeLastModifiedTime: 2025-09-29T12:34:56Z properties: + code: + description: 查询状态码 + type: integer + message: + description: 相关信息 + type: string env: description: 环境标识 type: string @@ -4840,6 +4855,17 @@ components: $ref: '#/components/schemas/OpenClusterDTO' type: array type: object + OpenMissEnvDTO: + example: + code: 0 + message: message + properties: + code: + description: 查询状态码 + type: integer + message: + type: string + type: object OpenNamespaceTextModel: example: configText: configText @@ -5259,14 +5285,25 @@ components: type: string type: object ExceptionResponse: - additionalProperties: true - description: | - 错误响应对象,表示为 Map。 字段包括: - status: HTTP 状态码 (integer) - message: 错误信息 (string) - timestamp: 出错时间戳 (string) - exception: 异常类名或标识 (string) example: status: 404 message: Resource not found timestamp: 2025-09-29T12:34:56Z exception: NotFoundException + properties: + status: + description: HTTP 状态码 + type: integer + message: + description: 错误信息 + type: string + timestamp: + description: 时间戳 + format: date-time + type: string + exception: + description: 错误类名 + type: string type: object SuccessEmptyResponse: properties: {} @@ -5285,15 +5322,6 @@ components: type: object MultiResponseEntity: description: A response container holding multiple RichResponseEntity objects - example: - code: 200 - entities: - - code: 200 - message: OK - body: "{}" - - code: 200 - message: OK - body: "{}" properties: code: description: Overall HTTP status code @@ -5311,10 +5339,6 @@ components: RichResponseEntity: description: "A wrapper for a single response entity with code, message, and\ \ body" - example: - code: 200 - message: OK - body: "{}" properties: code: description: HTTP status code diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES index f0cd175..3a164a1 100644 --- a/typescript/.openapi-generator/FILES +++ b/typescript/.openapi-generator/FILES @@ -14,6 +14,7 @@ src/apis/OrganizationManagementApi.ts src/apis/ReleaseManagementApi.ts src/apis/index.ts src/index.ts +src/models/ExceptionResponse.ts src/models/KVEntity.ts src/models/MultiResponseEntity.ts src/models/NamespaceGrayDelReleaseDTO.ts @@ -28,17 +29,18 @@ src/models/OpenGrayReleaseRuleDTO.ts src/models/OpenGrayReleaseRuleItemDTO.ts src/models/OpenInstanceConfigDTO.ts src/models/OpenInstanceDTO.ts +src/models/OpenInstancePageDTO.ts src/models/OpenItemChangeSets.ts src/models/OpenItemDTO.ts src/models/OpenItemDiffs.ts +src/models/OpenItemPageDTO.ts +src/models/OpenMissEnvDTO.ts src/models/OpenNamespaceDTO.ts src/models/OpenNamespaceIdentifier.ts src/models/OpenNamespaceLockDTO.ts src/models/OpenNamespaceSyncModel.ts src/models/OpenNamespaceTextModel.ts src/models/OpenOrganizationDto.ts -src/models/OpenPageDTOOpenInstanceDTO.ts -src/models/OpenPageDTOOpenItemDTO.ts src/models/OpenReleaseBO.ts src/models/OpenReleaseDTO.ts src/models/RichResponseEntity.ts diff --git a/typescript/src/apis/AppManagementApi.ts b/typescript/src/apis/AppManagementApi.ts index 9546b17..b746b72 100644 --- a/typescript/src/apis/AppManagementApi.ts +++ b/typescript/src/apis/AppManagementApi.ts @@ -15,20 +15,26 @@ import * as runtime from '../runtime'; import type { - MultiResponseEntity, + ExceptionResponse, OpenAppDTO, OpenCreateAppDTO, OpenEnvClusterDTO, + OpenEnvClusterInfo, + OpenMissEnvDTO, } from '../models'; import { - MultiResponseEntityFromJSON, - MultiResponseEntityToJSON, + ExceptionResponseFromJSON, + ExceptionResponseToJSON, OpenAppDTOFromJSON, OpenAppDTOToJSON, OpenCreateAppDTOFromJSON, OpenCreateAppDTOToJSON, OpenEnvClusterDTOFromJSON, OpenEnvClusterDTOToJSON, + OpenEnvClusterInfoFromJSON, + OpenEnvClusterInfoToJSON, + OpenMissEnvDTOFromJSON, + OpenMissEnvDTOToJSON, } from '../models'; export interface CreateAppRequest { @@ -37,13 +43,13 @@ export interface CreateAppRequest { export interface CreateAppInEnvRequest { env: string; - operator: string; openAppDTO: OpenAppDTO; + operator?: string; } export interface DeleteAppRequest { appId: string; - operator: string; + operator?: string; } export interface FindAppsRequest { @@ -58,10 +64,6 @@ export interface GetAppRequest { appId: string; } -export interface GetAppNavTreeRequest { - appId: string; -} - export interface GetAppsBySelfRequest { page: number; size: number; @@ -71,10 +73,14 @@ export interface GetEnvClusterInfoRequest { appId: string; } +export interface GetEnvClustersRequest { + appId: string; +} + export interface UpdateAppRequest { appId: string; - operator: string; openAppDTO: OpenAppDTO; + operator?: string; } /** @@ -86,7 +92,7 @@ export class AppManagementApi extends runtime.BaseAPI { * POST /openapi/v1/apps * 创建应用 (original openapi) */ - async createAppRaw(requestParameters: CreateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async createAppRaw(requestParameters: CreateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.openCreateAppDTO === null || requestParameters.openCreateAppDTO === undefined) { throw new runtime.RequiredError('openCreateAppDTO','Required parameter requestParameters.openCreateAppDTO was null or undefined when calling createApp.'); } @@ -109,14 +115,14 @@ export class AppManagementApi extends runtime.BaseAPI { body: OpenCreateAppDTOToJSON(requestParameters.openCreateAppDTO), }, initOverrides); - return new runtime.JSONApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); } /** * POST /openapi/v1/apps * 创建应用 (original openapi) */ - async createApp(requestParameters: CreateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async createApp(requestParameters: CreateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.createAppRaw(requestParameters, initOverrides); return await response.value(); } @@ -130,10 +136,6 @@ export class AppManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createAppInEnv.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling createAppInEnv.'); - } - if (requestParameters.openAppDTO === null || requestParameters.openAppDTO === undefined) { throw new runtime.RequiredError('openAppDTO','Required parameter requestParameters.openAppDTO was null or undefined when calling createAppInEnv.'); } @@ -181,10 +183,6 @@ export class AppManagementApi extends runtime.BaseAPI { throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteApp.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling deleteApp.'); - } - const queryParameters: any = {}; if (requestParameters.operator !== undefined) { @@ -285,10 +283,10 @@ export class AppManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs * 查找缺失的环境(new added) */ - async findMissEnvsRaw(requestParameters: FindMissEnvsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async findMissEnvsRaw(requestParameters: FindMissEnvsRequest, 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 findMissEnvs.'); } @@ -302,20 +300,20 @@ export class AppManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/miss_envs`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + path: `/openapi/v1/apps/{appId}/miss-envs`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => MultiResponseEntityFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenMissEnvDTOFromJSON)); } /** - * GET /openapi/v1/apps/{appId}/miss_envs + * GET /openapi/v1/apps/{appId}/miss-envs * 查找缺失的环境(new added) */ - async findMissEnvs(requestParameters: FindMissEnvsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async findMissEnvs(requestParameters: FindMissEnvsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { const response = await this.findMissEnvsRaw(requestParameters, initOverrides); return await response.value(); } @@ -357,16 +355,28 @@ export class AppManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/navtree - * 获取应用导航树(new added) + * GET /openapi/v1/apps/by-self + * 获取当前Consumer/User的应用列表(分页)(new added) */ - async getAppNavTreeRaw(requestParameters: GetAppNavTreeRequest, 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 getAppNavTree.'); + async getAppsBySelfRaw(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getAppsBySelf.'); + } + + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getAppsBySelf.'); } 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) { @@ -374,47 +384,35 @@ export class AppManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/apps/{appId}/navtree`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), + path: `/openapi/v1/apps/by-self`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => MultiResponseEntityFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); } /** - * GET /openapi/v1/apps/{appId}/navtree - * 获取应用导航树(new added) + * GET /openapi/v1/apps/by-self + * 获取当前Consumer/User的应用列表(分页)(new added) */ - async getAppNavTree(requestParameters: GetAppNavTreeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAppNavTreeRaw(requestParameters, initOverrides); + async getAppsBySelf(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getAppsBySelfRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer的应用列表(分页)(new added) + * /openapi/v1/apps/{appId}/env-cluster-info + * 获取应用环境集群详情(new added) */ - async getAppsBySelfRaw(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getAppsBySelf.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getAppsBySelf.'); + async getEnvClusterInfoRaw(requestParameters: GetEnvClusterInfoRequest, 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 getEnvClusterInfo.'); } 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) { @@ -422,31 +420,31 @@ export class AppManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/apps/by-self`, + path: `/openapi/v1/apps/{appId}/env-cluster-info`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); + return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenEnvClusterInfoFromJSON)); } /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer的应用列表(分页)(new added) + * /openapi/v1/apps/{appId}/env-cluster-info + * 获取应用环境集群详情(new added) */ - async getAppsBySelf(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getAppsBySelfRaw(requestParameters, initOverrides); + async getEnvClusterInfo(requestParameters: GetEnvClusterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getEnvClusterInfoRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/apps/{appId}/envclusters + * GET /openapi/v1/apps/{appId}/envClusters * 获取应用的环境集群信息 (original openapi) */ - async getEnvClusterInfoRaw(requestParameters: GetEnvClusterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getEnvClustersRaw(requestParameters: GetEnvClustersRequest, 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 getEnvClusterInfo.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getEnvClusters.'); } const queryParameters: any = {}; @@ -468,11 +466,11 @@ export class AppManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/apps/{appId}/envclusters + * GET /openapi/v1/apps/{appId}/envClusters * 获取应用的环境集群信息 (original openapi) */ - async getEnvClusterInfo(requestParameters: GetEnvClusterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getEnvClusterInfoRaw(requestParameters, initOverrides); + async getEnvClusters(requestParameters: GetEnvClustersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getEnvClustersRaw(requestParameters, initOverrides); return await response.value(); } @@ -480,15 +478,11 @@ export class AppManagementApi extends runtime.BaseAPI { * PUT /openapi/v1/apps/{appId} * 更新应用(new added) */ - async updateAppRaw(requestParameters: UpdateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async updateAppRaw(requestParameters: UpdateAppRequest, 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 updateApp.'); } - if (requestParameters.operator === null || requestParameters.operator === undefined) { - throw new runtime.RequiredError('operator','Required parameter requestParameters.operator was null or undefined when calling updateApp.'); - } - if (requestParameters.openAppDTO === null || requestParameters.openAppDTO === undefined) { throw new runtime.RequiredError('openAppDTO','Required parameter requestParameters.openAppDTO was null or undefined when calling updateApp.'); } @@ -515,14 +509,14 @@ export class AppManagementApi extends runtime.BaseAPI { body: OpenAppDTOToJSON(requestParameters.openAppDTO), }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response); } /** * PUT /openapi/v1/apps/{appId} * 更新应用(new added) */ - async updateApp(requestParameters: UpdateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async updateApp(requestParameters: UpdateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.updateAppRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/ClusterManagementApi.ts b/typescript/src/apis/ClusterManagementApi.ts index 81c126e..6f51d0f 100644 --- a/typescript/src/apis/ClusterManagementApi.ts +++ b/typescript/src/apis/ClusterManagementApi.ts @@ -15,9 +15,12 @@ import * as runtime from '../runtime'; import type { + ExceptionResponse, OpenClusterDTO, } from '../models'; import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, OpenClusterDTOFromJSON, OpenClusterDTOToJSON, } from '../models'; diff --git a/typescript/src/apis/InstanceManagementApi.ts b/typescript/src/apis/InstanceManagementApi.ts index 954050a..ae6c183 100644 --- a/typescript/src/apis/InstanceManagementApi.ts +++ b/typescript/src/apis/InstanceManagementApi.ts @@ -16,15 +16,25 @@ import * as runtime from '../runtime'; import type { OpenInstanceDTO, - OpenPageDTOOpenInstanceDTO, + OpenInstancePageDTO, } from '../models'; import { OpenInstanceDTOFromJSON, OpenInstanceDTOToJSON, - OpenPageDTOOpenInstanceDTOFromJSON, - OpenPageDTOOpenInstanceDTOToJSON, + OpenInstancePageDTOFromJSON, + OpenInstancePageDTOToJSON, } from '../models'; +export interface GetByNamespaceRequest { + env: string; + appId: string; + clusterName: string; + namespaceName: string; + page: number; + size: number; + instanceAppId?: string; +} + export interface GetByReleaseRequest { env: string; releaseId: number; @@ -32,12 +42,12 @@ export interface GetByReleaseRequest { size: number; } -export interface GetByReleasesNotInRequest { +export interface GetByReleasesAndNamespaceNotInRequest { env: string; appId: string; clusterName: string; namespaceName: string; - excludeReleases?: string; + releaseIds?: string; } export interface GetInstanceCountByNamespaceRequest { @@ -53,10 +63,88 @@ export interface GetInstanceCountByNamespaceRequest { export class InstanceManagementApi extends runtime.BaseAPI { /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * 根据namespaceName查询实例(new added) + */ + async getByNamespaceRaw(requestParameters: GetByNamespaceRequest, 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 getByNamespace.'); + } + + if (requestParameters.appId === null || requestParameters.appId === undefined) { + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByNamespace.'); + } + + if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByNamespace.'); + } + + if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByNamespace.'); + } + + if (requestParameters.page === null || requestParameters.page === undefined) { + throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getByNamespace.'); + } + + if (requestParameters.size === null || requestParameters.size === undefined) { + throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getByNamespace.'); + } + + const queryParameters: any = {}; + + if (requestParameters.appId !== undefined) { + queryParameters['appId'] = requestParameters.appId; + } + + if (requestParameters.clusterName !== undefined) { + queryParameters['clusterName'] = requestParameters.clusterName; + } + + if (requestParameters.namespaceName !== undefined) { + queryParameters['namespaceName'] = requestParameters.namespaceName; + } + + if (requestParameters.instanceAppId !== undefined) { + queryParameters['instanceAppId'] = requestParameters.instanceAppId; + } + + 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}/instances/by-namespace`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => OpenInstancePageDTOFromJSON(jsonValue)); + } + + /** + * 根据namespaceName查询实例(new added) + */ + async getByNamespace(requestParameters: GetByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getByNamespaceRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GET /openapi/v1/envs/{env}/instances/by-release * 根据发布版本查询实例(支持分页) (new added) */ - async getByReleaseRaw(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + async getByReleaseRaw(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { if (requestParameters.env === null || requestParameters.env === undefined) { throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByRelease.'); } @@ -75,6 +163,10 @@ export class InstanceManagementApi extends runtime.BaseAPI { const queryParameters: any = {}; + if (requestParameters.releaseId !== undefined) { + queryParameters['releaseId'] = requestParameters.releaseId; + } + if (requestParameters.page !== undefined) { queryParameters['page'] = requestParameters.page; } @@ -90,49 +182,60 @@ export class InstanceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/releases/{releaseId}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), + path: `/openapi/v1/envs/{env}/instances/by-release`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenInstanceDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenInstancePageDTOFromJSON(jsonValue)); } /** - * GET /openapi/v1/envs/{env}/releases/{releaseId}/instances + * GET /openapi/v1/envs/{env}/instances/by-release * 根据发布版本查询实例(支持分页) (new added) */ - async getByRelease(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async getByRelease(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.getByReleaseRaw(requestParameters, initOverrides); return await response.value(); } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * 查询不在指定发布版本中的实例 (new added) */ - async getByReleasesNotInRaw(requestParameters: GetByReleasesNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { + async getByReleasesAndNamespaceNotInRaw(requestParameters: GetByReleasesAndNamespaceNotInRequest, 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 getByReleasesNotIn.'); + throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByReleasesAndNamespaceNotIn.'); } if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByReleasesNotIn.'); + throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByReleasesAndNamespaceNotIn.'); } if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByReleasesNotIn.'); + throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByReleasesAndNamespaceNotIn.'); } if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByReleasesNotIn.'); + throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByReleasesAndNamespaceNotIn.'); } const queryParameters: any = {}; - if (requestParameters.excludeReleases !== undefined) { - queryParameters['excludeReleases'] = requestParameters.excludeReleases; + if (requestParameters.appId !== undefined) { + queryParameters['appId'] = requestParameters.appId; + } + + if (requestParameters.clusterName !== undefined) { + queryParameters['clusterName'] = requestParameters.clusterName; + } + + if (requestParameters.namespaceName !== undefined) { + queryParameters['namespaceName'] = requestParameters.namespaceName; + } + + if (requestParameters.releaseIds !== undefined) { + queryParameters['releaseIds'] = requestParameters.releaseIds; } const headerParameters: runtime.HTTPHeaders = {}; @@ -142,7 +245,7 @@ export class InstanceManagementApi extends runtime.BaseAPI { } const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), + path: `/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), method: 'GET', headers: headerParameters, query: queryParameters, @@ -152,11 +255,10 @@ export class InstanceManagementApi extends runtime.BaseAPI { } /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances?excludeReleases=1,2,3 * 查询不在指定发布版本中的实例 (new added) */ - async getByReleasesNotIn(requestParameters: GetByReleasesNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getByReleasesNotInRaw(requestParameters, initOverrides); + async getByReleasesAndNamespaceNotIn(requestParameters: GetByReleasesAndNamespaceNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const response = await this.getByReleasesAndNamespaceNotInRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/ItemManagementApi.ts b/typescript/src/apis/ItemManagementApi.ts index 90f3e53..de4baa2 100644 --- a/typescript/src/apis/ItemManagementApi.ts +++ b/typescript/src/apis/ItemManagementApi.ts @@ -15,23 +15,26 @@ import * as runtime from '../runtime'; import type { + ExceptionResponse, OpenItemDTO, OpenItemDiffs, + OpenItemPageDTO, OpenNamespaceSyncModel, OpenNamespaceTextModel, - OpenPageDTOOpenItemDTO, } from '../models'; import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, OpenItemDTOFromJSON, OpenItemDTOToJSON, OpenItemDiffsFromJSON, OpenItemDiffsToJSON, + OpenItemPageDTOFromJSON, + OpenItemPageDTOToJSON, OpenNamespaceSyncModelFromJSON, OpenNamespaceSyncModelToJSON, OpenNamespaceTextModelFromJSON, OpenNamespaceTextModelToJSON, - OpenPageDTOOpenItemDTOFromJSON, - OpenPageDTOOpenItemDTOToJSON, } from '../models'; export interface BatchUpdateItemsByTextRequest { @@ -466,7 +469,7 @@ export class ItemManagementApi extends runtime.BaseAPI { * 获取指定命名空间的配置项列表,支持分页 * 获取命名空间下的配置项列表 (original openapi) */ - async findItemsByNamespaceRaw(requestParameters: FindItemsByNamespaceRequest, 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 findItemsByNamespace.'); } @@ -514,14 +517,14 @@ export class ItemManagementApi extends runtime.BaseAPI { query: queryParameters, }, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPageDTOOpenItemDTOFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemPageDTOFromJSON(jsonValue)); } /** * 获取指定命名空间的配置项列表,支持分页 * 获取命名空间下的配置项列表 (original openapi) */ - async findItemsByNamespace(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + async findItemsByNamespace(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { const response = await this.findItemsByNamespaceRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/typescript/src/apis/NamespaceBranchManagementApi.ts b/typescript/src/apis/NamespaceBranchManagementApi.ts index 45a0697..3b45da2 100644 --- a/typescript/src/apis/NamespaceBranchManagementApi.ts +++ b/typescript/src/apis/NamespaceBranchManagementApi.ts @@ -15,12 +15,15 @@ import * as runtime from '../runtime'; import type { + ExceptionResponse, NamespaceReleaseDTO, OpenGrayReleaseRuleDTO, OpenNamespaceDTO, OpenReleaseDTO, } from '../models'; import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, NamespaceReleaseDTOFromJSON, NamespaceReleaseDTOToJSON, OpenGrayReleaseRuleDTOFromJSON, diff --git a/typescript/src/apis/NamespaceManagementApi.ts b/typescript/src/apis/NamespaceManagementApi.ts index 70970ab..013b011 100644 --- a/typescript/src/apis/NamespaceManagementApi.ts +++ b/typescript/src/apis/NamespaceManagementApi.ts @@ -15,11 +15,14 @@ import * as runtime from '../runtime'; import type { + ExceptionResponse, OpenAppNamespaceDTO, OpenNamespaceDTO, OpenNamespaceLockDTO, } from '../models'; import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, OpenAppNamespaceDTOFromJSON, OpenAppNamespaceDTOToJSON, OpenNamespaceDTOFromJSON, diff --git a/typescript/src/apis/OrganizationManagementApi.ts b/typescript/src/apis/OrganizationManagementApi.ts index 764e447..fcfd2a3 100644 --- a/typescript/src/apis/OrganizationManagementApi.ts +++ b/typescript/src/apis/OrganizationManagementApi.ts @@ -15,9 +15,12 @@ import * as runtime from '../runtime'; import type { + ExceptionResponse, OpenOrganizationDto, } from '../models'; import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, OpenOrganizationDtoFromJSON, OpenOrganizationDtoToJSON, } from '../models'; diff --git a/typescript/src/apis/ReleaseManagementApi.ts b/typescript/src/apis/ReleaseManagementApi.ts index f7738e9..558c126 100644 --- a/typescript/src/apis/ReleaseManagementApi.ts +++ b/typescript/src/apis/ReleaseManagementApi.ts @@ -15,12 +15,15 @@ import * as runtime from '../runtime'; import type { + ExceptionResponse, NamespaceGrayDelReleaseDTO, NamespaceReleaseDTO, OpenReleaseBO, OpenReleaseDTO, } from '../models'; import { + ExceptionResponseFromJSON, + ExceptionResponseToJSON, NamespaceGrayDelReleaseDTOFromJSON, NamespaceGrayDelReleaseDTOToJSON, NamespaceReleaseDTOFromJSON, diff --git a/typescript/src/models/ExceptionResponse.ts b/typescript/src/models/ExceptionResponse.ts new file mode 100644 index 0000000..0f0db3f --- /dev/null +++ b/typescript/src/models/ExceptionResponse.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 ExceptionResponse + */ +export interface ExceptionResponse { + /** + * HTTP 状态码 + * @type {number} + * @memberof ExceptionResponse + */ + status?: number; + /** + * 错误信息 + * @type {string} + * @memberof ExceptionResponse + */ + message?: string; + /** + * 时间戳 + * @type {Date} + * @memberof ExceptionResponse + */ + timestamp?: Date; + /** + * 错误类名 + * @type {string} + * @memberof ExceptionResponse + */ + exception?: string; +} + +/** + * Check if a given object implements the ExceptionResponse interface. + */ +export function instanceOfExceptionResponse(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function ExceptionResponseFromJSON(json: any): ExceptionResponse { + return ExceptionResponseFromJSONTyped(json, false); +} + +export function ExceptionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExceptionResponse { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'status': !exists(json, 'status') ? undefined : json['status'], + 'message': !exists(json, 'message') ? undefined : json['message'], + 'timestamp': !exists(json, 'timestamp') ? undefined : (new Date(json['timestamp'])), + 'exception': !exists(json, 'exception') ? undefined : json['exception'], + }; +} + +export function ExceptionResponseToJSON(value?: ExceptionResponse | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'status': value.status, + 'message': value.message, + 'timestamp': value.timestamp === undefined ? undefined : (value.timestamp.toISOString()), + 'exception': value.exception, + }; +} diff --git a/typescript/src/models/OpenAppDTO.ts b/typescript/src/models/OpenAppDTO.ts index 8f691ea..4229577 100644 --- a/typescript/src/models/OpenAppDTO.ts +++ b/typescript/src/models/OpenAppDTO.ts @@ -79,6 +79,12 @@ export interface OpenAppDTO { * @memberof OpenAppDTO */ ownerEmail?: string; + /** + * + * @type {string} + * @memberof OpenAppDTO + */ + ownerDisplayName?: string; } /** @@ -110,6 +116,7 @@ export function OpenAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean) 'orgName': !exists(json, 'orgName') ? undefined : json['orgName'], 'ownerName': !exists(json, 'ownerName') ? undefined : json['ownerName'], 'ownerEmail': !exists(json, 'ownerEmail') ? undefined : json['ownerEmail'], + 'ownerDisplayName': !exists(json, 'ownerDisplayName') ? undefined : json['ownerDisplayName'], }; } @@ -132,5 +139,6 @@ export function OpenAppDTOToJSON(value?: OpenAppDTO | null): any { 'orgName': value.orgName, 'ownerName': value.ownerName, 'ownerEmail': value.ownerEmail, + 'ownerDisplayName': value.ownerDisplayName, }; } diff --git a/typescript/src/models/OpenCreateAppDTO.ts b/typescript/src/models/OpenCreateAppDTO.ts index dca98b1..2d319a4 100644 --- a/typescript/src/models/OpenCreateAppDTO.ts +++ b/typescript/src/models/OpenCreateAppDTO.ts @@ -34,10 +34,10 @@ export interface OpenCreateAppDTO { assignAppRoleToSelf?: boolean; /** * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @type {Array} + * @type {Set} * @memberof OpenCreateAppDTO */ - admins?: Array; + admins?: Set; /** * * @type {OpenAppDTO} @@ -81,7 +81,7 @@ export function OpenCreateAppDTOToJSON(value?: OpenCreateAppDTO | null): any { return { 'assignAppRoleToSelf': value.assignAppRoleToSelf, - 'admins': value.admins, + 'admins': value.admins === undefined ? undefined : Array.from(value.admins as Set), 'app': OpenAppDTOToJSON(value.app), }; } diff --git a/typescript/src/models/OpenEnvClusterInfo.ts b/typescript/src/models/OpenEnvClusterInfo.ts index 04a75ad..54df01a 100644 --- a/typescript/src/models/OpenEnvClusterInfo.ts +++ b/typescript/src/models/OpenEnvClusterInfo.ts @@ -26,6 +26,18 @@ import { * @interface OpenEnvClusterInfo */ export interface OpenEnvClusterInfo { + /** + * 查询状态码 + * @type {number} + * @memberof OpenEnvClusterInfo + */ + code?: number; + /** + * 相关信息 + * @type {string} + * @memberof OpenEnvClusterInfo + */ + message?: string; /** * 环境标识 * @type {string} @@ -59,6 +71,8 @@ export function OpenEnvClusterInfoFromJSONTyped(json: any, ignoreDiscriminator: } return { + 'code': !exists(json, 'code') ? undefined : json['code'], + 'message': !exists(json, 'message') ? undefined : json['message'], 'env': !exists(json, 'env') ? undefined : json['env'], 'clusters': !exists(json, 'clusters') ? undefined : ((json['clusters'] as Array).map(OpenClusterDTOFromJSON)), }; @@ -73,6 +87,8 @@ export function OpenEnvClusterInfoToJSON(value?: OpenEnvClusterInfo | null): any } return { + 'code': value.code, + 'message': value.message, 'env': value.env, 'clusters': value.clusters === undefined ? undefined : ((value.clusters as Array).map(OpenClusterDTOToJSON)), }; diff --git a/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts b/typescript/src/models/OpenInstancePageDTO.ts similarity index 68% rename from typescript/src/models/OpenPageDTOOpenInstanceDTO.ts rename to typescript/src/models/OpenInstancePageDTO.ts index 12f853e..1cf8e05 100644 --- a/typescript/src/models/OpenPageDTOOpenInstanceDTO.ts +++ b/typescript/src/models/OpenInstancePageDTO.ts @@ -23,49 +23,49 @@ import { /** * 分页实例数据传输对象,用于返回分页查询的实例列表结果 * @export - * @interface OpenPageDTOOpenInstanceDTO + * @interface OpenInstancePageDTO */ -export interface OpenPageDTOOpenInstanceDTO { +export interface OpenInstancePageDTO { /** * 当前页码,从0开始计数 * @type {number} - * @memberof OpenPageDTOOpenInstanceDTO + * @memberof OpenInstancePageDTO */ page?: number; /** * 每页显示的记录数量 * @type {number} - * @memberof OpenPageDTOOpenInstanceDTO + * @memberof OpenInstancePageDTO */ size?: number; /** * 总记录数,符合查询条件的实例总数量 * @type {number} - * @memberof OpenPageDTOOpenInstanceDTO + * @memberof OpenInstancePageDTO */ total?: number; /** * 当前页的实例列表,包含具体的实例数据 * @type {Array} - * @memberof OpenPageDTOOpenInstanceDTO + * @memberof OpenInstancePageDTO */ - content?: Array; + instances?: Array; } /** - * Check if a given object implements the OpenPageDTOOpenInstanceDTO interface. + * Check if a given object implements the OpenInstancePageDTO interface. */ -export function instanceOfOpenPageDTOOpenInstanceDTO(value: object): boolean { +export function instanceOfOpenInstancePageDTO(value: object): boolean { let isInstance = true; return isInstance; } -export function OpenPageDTOOpenInstanceDTOFromJSON(json: any): OpenPageDTOOpenInstanceDTO { - return OpenPageDTOOpenInstanceDTOFromJSONTyped(json, false); +export function OpenInstancePageDTOFromJSON(json: any): OpenInstancePageDTO { + return OpenInstancePageDTOFromJSONTyped(json, false); } -export function OpenPageDTOOpenInstanceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPageDTOOpenInstanceDTO { +export function OpenInstancePageDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstancePageDTO { if ((json === undefined) || (json === null)) { return json; } @@ -74,11 +74,11 @@ export function OpenPageDTOOpenInstanceDTOFromJSONTyped(json: any, ignoreDiscrim 'page': !exists(json, 'page') ? undefined : json['page'], 'size': !exists(json, 'size') ? undefined : json['size'], 'total': !exists(json, 'total') ? undefined : json['total'], - 'content': !exists(json, 'content') ? undefined : ((json['content'] as Array).map(OpenInstanceDTOFromJSON)), + 'instances': !exists(json, 'instances') ? undefined : ((json['instances'] as Array).map(OpenInstanceDTOFromJSON)), }; } -export function OpenPageDTOOpenInstanceDTOToJSON(value?: OpenPageDTOOpenInstanceDTO | null): any { +export function OpenInstancePageDTOToJSON(value?: OpenInstancePageDTO | null): any { if (value === undefined) { return undefined; } @@ -90,6 +90,6 @@ export function OpenPageDTOOpenInstanceDTOToJSON(value?: OpenPageDTOOpenInstance 'page': value.page, 'size': value.size, 'total': value.total, - 'content': value.content === undefined ? undefined : ((value.content as Array).map(OpenInstanceDTOToJSON)), + 'instances': value.instances === undefined ? undefined : ((value.instances as Array).map(OpenInstanceDTOToJSON)), }; } diff --git a/typescript/src/models/OpenPageDTOOpenItemDTO.ts b/typescript/src/models/OpenItemPageDTO.ts similarity index 77% rename from typescript/src/models/OpenPageDTOOpenItemDTO.ts rename to typescript/src/models/OpenItemPageDTO.ts index 9273d2b..ebefe88 100644 --- a/typescript/src/models/OpenPageDTOOpenItemDTO.ts +++ b/typescript/src/models/OpenItemPageDTO.ts @@ -23,49 +23,49 @@ import { /** * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 * @export - * @interface OpenPageDTOOpenItemDTO + * @interface OpenItemPageDTO */ -export interface OpenPageDTOOpenItemDTO { +export interface OpenItemPageDTO { /** * 当前页码,从0开始计数 * @type {number} - * @memberof OpenPageDTOOpenItemDTO + * @memberof OpenItemPageDTO */ page?: number; /** * 每页显示的记录数量 * @type {number} - * @memberof OpenPageDTOOpenItemDTO + * @memberof OpenItemPageDTO */ size?: number; /** * 总记录数,符合查询条件的配置项总数量 * @type {number} - * @memberof OpenPageDTOOpenItemDTO + * @memberof OpenItemPageDTO */ total?: number; /** * 当前页的配置项列表,包含具体的配置项数据 * @type {Array} - * @memberof OpenPageDTOOpenItemDTO + * @memberof OpenItemPageDTO */ content?: Array; } /** - * Check if a given object implements the OpenPageDTOOpenItemDTO interface. + * Check if a given object implements the OpenItemPageDTO interface. */ -export function instanceOfOpenPageDTOOpenItemDTO(value: object): boolean { +export function instanceOfOpenItemPageDTO(value: object): boolean { let isInstance = true; return isInstance; } -export function OpenPageDTOOpenItemDTOFromJSON(json: any): OpenPageDTOOpenItemDTO { - return OpenPageDTOOpenItemDTOFromJSONTyped(json, false); +export function OpenItemPageDTOFromJSON(json: any): OpenItemPageDTO { + return OpenItemPageDTOFromJSONTyped(json, false); } -export function OpenPageDTOOpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPageDTOOpenItemDTO { +export function OpenItemPageDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemPageDTO { if ((json === undefined) || (json === null)) { return json; } @@ -78,7 +78,7 @@ export function OpenPageDTOOpenItemDTOFromJSONTyped(json: any, ignoreDiscriminat }; } -export function OpenPageDTOOpenItemDTOToJSON(value?: OpenPageDTOOpenItemDTO | null): any { +export function OpenItemPageDTOToJSON(value?: OpenItemPageDTO | null): any { if (value === undefined) { return undefined; } diff --git a/typescript/src/models/OpenMissEnvDTO.ts b/typescript/src/models/OpenMissEnvDTO.ts new file mode 100644 index 0000000..2af2c5e --- /dev/null +++ b/typescript/src/models/OpenMissEnvDTO.ts @@ -0,0 +1,72 @@ +/* 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 OpenMissEnvDTO + */ +export interface OpenMissEnvDTO { + /** + * 查询状态码 + * @type {number} + * @memberof OpenMissEnvDTO + */ + code?: number; + /** + * + * @type {string} + * @memberof OpenMissEnvDTO + */ + message?: string; +} + +/** + * Check if a given object implements the OpenMissEnvDTO interface. + */ +export function instanceOfOpenMissEnvDTO(value: object): boolean { + let isInstance = true; + + return isInstance; +} + +export function OpenMissEnvDTOFromJSON(json: any): OpenMissEnvDTO { + return OpenMissEnvDTOFromJSONTyped(json, false); +} + +export function OpenMissEnvDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenMissEnvDTO { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'code': !exists(json, 'code') ? undefined : json['code'], + 'message': !exists(json, 'message') ? undefined : json['message'], + }; +} + +export function OpenMissEnvDTOToJSON(value?: OpenMissEnvDTO | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'code': value.code, + 'message': value.message, + }; +} diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index eaaa6ae..f40a4bc 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -1,5 +1,6 @@ /* tslint:disable */ /* eslint-disable */ +export * from './ExceptionResponse'; export * from './KVEntity'; export * from './MultiResponseEntity'; export * from './NamespaceGrayDelReleaseDTO'; @@ -14,17 +15,18 @@ export * from './OpenGrayReleaseRuleDTO'; export * from './OpenGrayReleaseRuleItemDTO'; export * from './OpenInstanceConfigDTO'; export * from './OpenInstanceDTO'; +export * from './OpenInstancePageDTO'; export * from './OpenItemChangeSets'; export * from './OpenItemDTO'; export * from './OpenItemDiffs'; +export * from './OpenItemPageDTO'; +export * from './OpenMissEnvDTO'; export * from './OpenNamespaceDTO'; export * from './OpenNamespaceIdentifier'; export * from './OpenNamespaceLockDTO'; export * from './OpenNamespaceSyncModel'; export * from './OpenNamespaceTextModel'; export * from './OpenOrganizationDto'; -export * from './OpenPageDTOOpenInstanceDTO'; -export * from './OpenPageDTOOpenItemDTO'; export * from './OpenReleaseBO'; export * from './OpenReleaseDTO'; export * from './RichResponseEntity';